Hi,
Would any one let me know how to parse files name on input file stage in a sequential file stage? Say for example source file names are:
file1_20040825_132154.txt
file2_20040418_211536.txt
etc. There a bunch of files in the source directory and I don't want to pass each file everytime.
How can this be accomplished?
thanks,
Tom
Parsing file names
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
You could concatenate and process as a single large file, or use job parameters to pass the appropriate filename to the job in a loop.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Hi, Sorry for hijacking the thread, but I was curious about how to create a loop that passes user-defined filenames in a loop during a job run. I use DS ver 7.0, and it does not have the loop activity stages. Kenneth, can you shed some light on this?kcbland wrote:use job parameters to pass the appropriate filename to the job in a loop.
Thanks,
gateleys
Custom job control, use a Batch job, use DSExecute API to browse a directory for a list of files, parse the screen output and loop running your jobs, probably doing something like tagging/moving the file after processed so that it doesn't get handled again. Check out Batch jobs from Director, they're really cool. Shows you everything to get started with the APIs for running/managing a job.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle