I am trying to loop through a list of files:
The list is determined using StrParse which populates an array based on the variable [FileName]. Thus it would be FileName1, FileName2, FileName3 etc.
In a Loop, I am using the loop's counter to identify the element in the array:
Loop "1" "[FileCount]" "[Counter]"
setvar "[FileName]" "[FileName]![Counter]"
.do my processing here and then reset the Filename for the next iteration.
setvar "[Filename]" ""
EndLoop
I have tried with and without the "!" but all I get is the counter number. If I use the actual variable [FileName1] the it works but of course I cannot auto increment the parsed elements.
What am I doing wrong?
Chris.
StrParse array and using Loop Counter
Moderator: Neosoft Support
- agilefalcon
- Posts: 11
- Joined: Sat Jan 06, 2007 7:47 pm
- Contact:
StrParse array and using Loop Counter
Chris Berardi
Fort Worth, TX
Fort Worth, TX
Re: StrParse array and using Loop Counter
setvar "[VarName]" "[FileName[Counter]]"
- agilefalcon
- Posts: 11
- Joined: Sat Jan 06, 2007 7:47 pm
- Contact:
Re: StrParse array and using Loop Counter
Sweet! Thank you for your help.
Chris
Chris
Chris Berardi
Fort Worth, TX
Fort Worth, TX