Contact Us

Let us know to help you out quickly!

 Admin User     Feb,08 2017

Loop Over a File in Coldfusion

Here is a little code of looping over a file in coldfusion using CFLOOP.

Lets have a look.

  • Loop over a file - lines.

<cfloop file="YourFilePath" index="line">Your code goes on here...</cfloop>

  • Loop over a file - characters. You can specify number of characters to loop over.

<cfloop file="YourFilePath" index="chars" characters="6">Your code goes on here..</cfloop>