Very simply question.
I am using an Win32Console Zip program (ZipMagic's) to create a regular backup of a development directory.
I want to create a zip file (I can do that bit no problems) with the name containing the date and time. This would allow me to not have to move the file manually or rename it.
By using this method, I can schedule the zip every 5 minutes and have a load of backups for the few hours I work on the project. If I want to go back, I can choose when to go back to.
I can also take a copy manually by running the schedule by hand.
How can I get todays date and time into a batch file.
The batch file I want to run is ...
zipmd -a -e4 -nr -r DevCCYYMMDDhhmmss.zip dev
The seconds are not too important, so DevCCYYYMMDDhhmm.zip will do.
I can get the date and time as environment variables, but they have the / and : in them.
echo | more | time | Find "Current" > 01010.bat
echo | more | date | Find "Current" > 01010.bat
IF "%1"=="time" SET TODAYS_%1=%3
IF "%1"=="date" SET TODAYS_%1=%4
Results in ...
But I don't know how to remove the / and the : from them.