I make daily backups of all our data to a target folder using the current date as the filename. Here is the script. Works great.
Year>yy
Month>mm
Day>dd
Run Program>cmd /c XCopy S:\ d:\%MM%%DD%%YY% /s /e /h
Wait>2
Send Character/Text>D
The next macro burns it to DVD. So far so good. The problem is, I need to write a script to delete the backup folder that was created 8 days ago
on a daily basis to reclaim hard drive space. I wrote the following script, but it is not working properly. I got it working with let>dd=dd-6 it deletes the folder from 6 days ago. Also from the 1st to the 5 day of the month it does not work at all, probably because it has problems working with the new month. Any ideas? Thanks.
Year>yy
Month>mm
Day>dd
let>dd=dd-8
Change Directory>c:
Run Program>cmd /c rd /s /q c:\%MM%%DD%%YY%