Batch file to move files and add date

Associate
Joined
27 Oct 2002
Posts
326
Hello,

I want to move a .dmp file from one folder to another and add the days date of the move onto the filename.

I have done it once but can only get the Month and Year, but not day.

Ideally want it to use the system's date and not have another file that it looks into.

This is for a win2k3 Server Enterprise

Thanks

Tom
 
Man of Honour
Joined
11 Mar 2003
Posts
10,706
Location
Greenock, Scotland
OK, a bit of a rough and ready hack of something I've got here:

Code:
set CURRDATE=%DATE:/=-%

move dumpfile.dmp c:\dump_path\dumpfile_%CURRDATE%.dmp

You'll need to add your own paths and filenames but the above is the meat of it.
 
Back
Top Bottom