I made a batch file that will be executed everyday at a specified time. Basically all it does it to copy some files from one folder to another and put the date in it, so I have several versions of the same file.
FOR /F "TOKENS=1-4* DELIMS=/" %%A IN ('DATE/T') DO (
FOR %%A IN (%Day%) DO SET Day=%%A
FOR %%A IN (%Month%) DO SET Month=%%A
FOR %%A IN (%Year%) DO SET Year=%%A
copy "C:\Users\%USERPROFILE%\Documents\Cities In Motion\maps\Walden.grid" "C:\Users\%USERPROFILE%\Desktop\Codinome\Backups\%Day%.%Month%.%Year%\Walden.grid %Day%.%Month%.%Year%"
My problem now is that I will eventually execute this batch file by myself, when I need a backup before making any important changes to the file. If I do that, the file will be overwrite. Since I can only have 1 per day.
So I think about 2 solutions:
1) Add time to the name of the file.
2) Somehow make the copy command not overwrite any files (and also not prompt). But it will copy anyway, thus copy but rename, preferable with a sequential number.
How can I make any of those solutions?