Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Filename

Status
Not open for further replies.

venkatpavan

Programmer
Feb 18, 2006
42
SG
We receive four files with following naming convention,

My task is to read these four files from the same directory and process them through my script,

Filenames:
ABCD_CLIENT_20101203.csv
EFGH_CLIENT_20101203.csv
IJKL_CLIENT_20101203.csv
MNOP_CLIENT_20101203.csv

Q1. Issue is I have to read the file by filename and not use wild card,If it is a single file I can use the variable filename (ABCD_CLIENT_currentdate) and read directly using currentdate.

Any ideas??

Thanks,
V
 
You need to create the file names within your script but the format would depend on your naming convention.
What constants are there in the file names?
If the letters and the word 'CLIENT' stay the same it can be done quite easily.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top