renaming files in a DOS batch file

sparx

Morphed Human
Local time
Today, 07:11
Joined
Jul 22, 2002
Messages
80
I know this is a little off topic, but you guys have all the answers!!

I need to rename a file as such:

current file name: puro.88344
to be renamed to: puro.20031015.88344

Does anyone know the command line to execute this renaming?
Also, I have about 300 files like that eg.(puro.94323, puro.84312, etc.) so I would like to rename all the files at the same time, using the *.* operator.

If anyone has any other solutions, other than the path I am currently using, feel free to voice your opinions.

Thanks in advance,

Erik
 
in DOS the command is

ren c:\puro.88344 c:\puro.20031015.88344
 
I know that command, but how can you do that for 400 files (that have the same filename length), without hardcoding the filename, or the date itself?? Any ideas?
 
Sorry, I failed to mention, that this will be a daily procedure, therefore a batch file will be run every night renaming all the files in the specified directory. The date will always be the current date.
 
Thanks, I was able to modify the code and make it work to the way I wanted. I was really hoping to avoid using Access to perform this, as the procedure will be running on a server using Windows 95 and does not currently have Access installed on it.
 
If you had read my original post, I mentioned that this post was "a little off topic", I figured I'd post this in the "General" forum, even though it really wasn't an Access issue. I didn't think it would really pose a problem. I like this forum a lot, and I get most of my questions replied promptly, which is why I chose to post it here.
 

Users who are viewing this thread

Back
Top Bottom