You may want to reconsider using a numeric loop. Rather, can you build a delimited list of the filenames to process first? You can then pass that list to the Start Loop stage and it can loop through the list until it runs out of elements in the list. It can then leverage the built-in loop counter to pass filename #1 to the job / activity on the first iteration, filename #2 on the second iteration, etc etc.
Make any sort of sense? Is this the first time you've built any kind of a looping Sequence job? (just trying to level set here)
-craig
"You can never have too many knives" -- Logan Nine Fingers
We have a generic FTP job that loops for the number of files being transfered. Each invocation reads a text file that lists the filenames. I like simple and easy, so it goes like this:
1) Find number of files in current list. I use UV stages as needed.
2) Set end of loop counter with the file count.
3) Read text file for the filename for each iteration of the loop.
4) I can add or delete files from each list as needed, no changes to DS code.
Something very important in my design is error handling and restartability. The main sequence stage -- FTP for me, cp command for you -- is checkpointed. I can rerun a job and have it restart at the failed iteration without further intervention.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson