AnsweredAssumed Answered

Extracting from a list

Question asked by dhillock on Feb 27, 2013
Latest reply on Feb 28, 2013 by philmodjunk

Title

Extracting from a list

Post

     I have a variable ($cMyListOfFiles) and it contains -- guess what -- a list of files from a folder. Each filename is on a separate line.

     Using PatternCount, I know how many files are in the list. I therefore have $nNumberOfFiles.

     I setup a loop that will loop for the number of files.

     My problem is that I cannot figure out how to pull-out the filename related to the loop iteration. For example on the first iteration of the loop, I want the first file name. This will be stored in $cTheCurrentFile. On the second iteration of the loop, I want to extract and store in $cTheCurrentFile, the second file in the list.

     I'm sure there is a straightforward way of doing this...but I cannot see how it's done. All suggestions are appreciated.

Outcomes