Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I would like to run some script on many data files of wich each 5 should result in a qvd file in a seperate folder. So what I would like to do is have a flat files in which I give the characteristics of this. Example:
Nr FileName/TargetFolder
1 AD_EUR_1
2 DR_USA_3
... ....
17 APL_3_D
So based on this table I would like the script to run 17 times and have a variable based on the 'FileName/TargetFolder' that determines which files are loaded and where it stored. What I would like to know is how I can have the variable be different each run.
Thanks for your help!
Erik
If I understand correctly you just want to create a simple loop, no?
LET vFileCount = NoOfRows('Files');
FOR i = 0 to $(vFileCount) - 1
LET vFileName = Peek('FileName', $(i), 'Files');
LET vTargetFolder = Peek('TargetFolder', $(i), 'Files');
...do your load here using the above variables...
NEXT i
That's it indeed!
But, in my script there is a loop as well so now I have a nested loop. Will this work?
Got it, its possible as long as you have the right extension after 'next'
Sure, you can nest as many loops as you wish. You just need to create multiple variables to loop with.