Page 1 of 1

Reading SEQ Filename with a Date time

Posted: Sat Dec 17, 2011 4:53 pm
by vskr72
I have a file that is dropped a by a system which has the Timestamp attached to it in this format.

Code: Select all

FileName_YYYYMMDD_HHMMSS.txt
This file gets dropped into our system and we need to read it to load it into a table. Is there a way to read it without modifying the file name using any Unix commands. Thank you for your siuggestions.

Posted: Sat Dec 17, 2011 5:38 pm
by chulett
Sure, set the Read Method to 'File Pattern' and then supply the appropriate wildcard pattern to read the file. Yours could be "FileName_*.txt".

Posted: Sat Dec 17, 2011 7:01 pm
by vskr72
Worked like charm.

Posted: Sat Dec 17, 2011 9:32 pm
by pandeesh
I remember,in one of the scenario, i need to get the file from remote server.In that case there i haves used wildcard and identified the file name. Then from the command activity i have passed the job name as parameter to the job.

In your case, you are getting the file in your local server means, Craig's solution sounds good.