Page 1 of 1

Need a logic to pic a date attached file

Posted: Thu Mar 27, 2008 2:39 pm
by rajan.n
Hello all,[:)]
Hope some one throws some light [:)]
my requirement.
1) Daily we get file name 20080424ABC.txt and 20080424ABC_XYZ.txt (date concatinated to the file name ) in to our folder say \\z\files\
2)Now my job which reads "20080424ABC.txt " is with a seq file. I can not hardcode daily that date appended file. Important thing is we may run job at any time i.e daily or once in 2 days or 5 days once.So i may have 5 files since i run the job if am ruunning it after 5 days...my job should process them one by one the sequence is imprtant .
3) I want a logic - how can we parameterise my job and also have tht file name(20080424ABC) to be a field in my job so that we store that name to corresponding row loaded from respective file.

Posted: Thu Mar 27, 2008 2:47 pm
by kumar_s
Read all the files in a folder and pass it as parameter to the job, using a script. Or use execute command activity to pass as parameter and LoopActivity to loop through each Filename.

Posted: Thu Mar 27, 2008 3:03 pm
by rajan.n
kumar_s wrote:Read all the files in a folder and pass it as parameter to the job, using a script. Or use execute command activity to pass as parameter and LoopActivity to loop through each Filename. ...
thanks for the quick reply ,

Can you give me the process how to send a folder as a parameter in a script ( i have to use a bat script )
can i have code for that ?

Posted: Thu Mar 27, 2008 3:09 pm
by kumar_s
I was referring to pass all the files available in the particular folder. You can pass all the *ABC_XYZ.txt to the file one after another.