
September 7th, 2007, 08:50 PM
|
 |
Recovering Intellectual
|
|
Join Date: Jun 2006
Location: Orange County, CA
|
|
Quote: | Originally Posted by thilakag Hi,
I am trying to copy file(s) from a folder as a *.* and add the date stamp on to the file name.
at the moment I am doing it by knowing the file name. but how would I do it without knowing the files are in the folder "eg: copy\ ".
currently I am passing the file name as an argument.
apreciate help,
gem |
get yourself a directory listing into a variable and iterate through them one by one. Use the indexing variable to do a regular expression substitution on the file extension. You can place the new information on the end of the file and add the extension back on. What scripting language are you using?
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.
|