move and rename FIRST file in directory
Posted: 09 Mar 2009 03:28
Hoping someone can help cause I've wasted ALOT of time on this.
I have a directory that downloads a number of reports. These each take the same format: CDR_yyyymmdd.csv
I want to be able to access the FIRST file in a directory that matchese that pattern(just CDR*.csv will do and first copy it to another directory and then rename it.
For the record another program comes along and processes the renamed file and then deletes it, so I can only process one file per sweep.
Thanks for any help.
I have a directory that downloads a number of reports. These each take the same format: CDR_yyyymmdd.csv
I want to be able to access the FIRST file in a directory that matchese that pattern(just CDR*.csv will do and first copy it to another directory and then rename it.
For the record another program comes along and processes the renamed file and then deletes it, so I can only process one file per sweep.
Thanks for any help.