I have a set of 24 files with 24 different extensions that I want to copy to a backup directory and append the date in the filename if they are different from the previous version of the file. I made the following BAT file and run it daily (there are 24 lines in the BAT file, one for each extension):
copy CNP.ang bakup-do-not-erase\CNP_%date:~4,2%-%date:~7,2%-%date:~10,4%.ang
Using the above BAT file I get a copy of the data file (all text) every day. I would like to add a little more intelligence to the copy and only do the copy if the file has changed since the last time I made a copy of that file. I suppose that I could always do the copy to the backup directory and then make a second pass with a new BAT file and delete the newer file if it were the same as the previous days version.
What I want to accomplish is to safeguard the data in case someone deletes some lines and be able to restore the previous data file but I don't want to have 30 copies of the same data if it has not changed.