I myself have taken the easy route with this myself. I shuffle backup files down a path to eventual deletion. Example Being Folder 1, Folder 2, and Folder 3.
Folder 1 is populated with the latest backup
Folder 2 is populated with backup that is up to 2 days old
Folder 3 is the waste bin where all files that end up here get deleted
example being:
echo off
cls
@echo. Shuffling Backups and Deleting the 3rd day
@echo.
erase c:\backups\folder3\*.* /q
xcopy c:\backups\folder2\*.* c:\backups\folder3\*.*
erase c:\backups\folder2\*.* /q
xcopy c:\backups\folder1\*.* c:\backups\folder2\*.*
erase c:\backups\folder1\*.* /q
@echo.
@echo. Backup Shuffle Complete
pause
You will want to run this shuffle batch prior to your actual backup of latest data to folder1. This way all data is shuffled down making folder1 empty waiting the latest data after each run of this. *Note: Use of xcopy and wildcards is because I use this myself for multiple file types.
If you dont want it to shuffle as a wildcard anything contained within, you can shuffle just the mdb and xls files.
Warning: It is assumed when running this batch that no other important data is at the backup location such as Folder1 as for if the application or program is located in the same location as the backups such as with my example at Folder 1, it will rip the data from its home location and pass it down stream to Folder 2. This one line here is very dangerous if for example your program or application resided at the same location as your backups. If this is the case then the backup location needs to be changed to protect from moving the program from where it should remain. erase c:\backups\folder1\*.* /q
echo off
cls
@echo. Shuffling Backups and Deleting the 3rd day
@echo.
erase c:\backups\folder3\*.* /q
xcopy c:\backups\folder2\*.mdb c:\backups\folder3\*.mdb
xcopy c:\backups\folder2\*.xls c:\backups\folder3\*.xls
erase c:\backups\folder2\*.* /q
xcopy c:\backups\folder1\*.mdb c:\backups\folder2\*.mdb
xcopy c:\backups\folder1\*.xls c:\backups\folder2\*.xls
erase c:\backups\folder1\*.* /q
@echo.
@echo. Backup Shuffle Complete
pause
*Last Important Note... You actually have 3 days of backup before the batch is run again. The waste cleanup of Folder 3 doesnt happen until the next run of this batch. So after you have run this and data is moved down from folder 2 to 3 ... 1 to 2 and then you run your backup for that day into the was empty Folder 1. You now have Folder 1, 2, and 3 with backup files. Until this batch is run in which Folder 3 is wiped clean and only 2 days move from folder to folder.
Reason why I did not use the MOVE command and decided to use XCOPY is because if this process was disrupted say a blackout. The MOVE command is less graceful to disruption whereas I have been told that XCOPY is graceful to interruption because its making a copy of the data to another destination vs moving the data bit for bit which if interrupted spells disaster. Maybe one of the batch gurus here can confirm that rumor. If using the MOVE command alone, this could be shortened as for the only erase would need to happen at Folder 3 and the MOVE command would move data between Folders 2 to 3 and 1 to 2.