Page 1 of 1

File Name Issue....

Posted: Mon Jan 31, 2011 2:03 pm
by ravitell1
Hello All,


I have a situation where a file comes everyday with the name
"20101023000004_Sample_File" ....
File schedule for everyday
So the file name changes everyday... How to approach this issue...

Help appreciated...
Ravi.

Posted: Mon Jan 31, 2011 3:52 pm
by ray.wurlod
Have the file land in a particular folder. In a sequence use a DIR /B command to get the file name and feed it to your job. Move the file to a different folder when done.

Posted: Mon Jan 31, 2011 11:21 pm
by Shruthi
One another option is File Pattern.

You can choose "Read Method" property to "File Pattern" and File name as "*_Sample_File"

But this can be used if any specific pattern there in file.

Posted: Mon Jan 31, 2011 11:39 pm
by chulett
Not in a Server job, I'm afraid.

Posted: Tue Feb 01, 2011 9:41 am
by koolsun85
I think its better to go with a shell script.It gives you more flexibility.

Posted: Tue Feb 01, 2011 10:34 am
by chulett
If your scripting or command line skills leave something to be desired, another option is the Folder stage. It can return filenames based on a wildcard pattern if all you define is a single column in it.

Posted: Tue Feb 01, 2011 11:41 am
by ravitell1
ray.wurlod wrote:Have the file land in a particular folder. In a sequence use a DIR /B command to get the file name and feed it to your job. Move the file to a different folder when done. ...


Thanks it worked...