Page 1 of 1

How to pass filenames 1 at a time to server routine

Posted: Wed Jan 23, 2013 2:58 pm
by synsog
I have 100 files in a folder. All file names are started with name TU_*. I need to pass 1 file name at a time to a server routine which need to exectue in sequence job. Suppose today there might be 100 files, tomorrow,,, 200 files .. so on a day.. if N number of files present, then the loop should execute N times and the server routine should exectue for each filename.

Thanks in Advance.

Posted: Wed Jan 23, 2013 4:49 pm
by chulett
Unless I'm missing something, that just sounds like a Sequence job with the Start Loop and End Loop stages. Have you tried using them for this task?

Posted: Wed Jan 23, 2013 7:30 pm
by ray.wurlod
Use a server job reading the output of the Filter command DIR /B pathname/TU* which will give you a stream of file names that you can pass to the Routine in a Transformer stage.

Or use a sequence with an Execute Command activity to generate the list of file names, and a loop containing a Routine activity to process those one at a time.