SyncToy archive backups?

Soldato
Joined
2 May 2004
Posts
19,950
I'm just wondering if there's any way to have 'archive' backups using SyncToy, so rather than overwriting the previous backup it'll create a whole new backup in a new folder automatically, then after 5 or so are created the oldest one will be deleted.

Thanks,
Craig.
 
I'm open to anything, I don't mind changing program if it means putting every new backup in a new folder rather than overwriting :)

Just though I could try something along the lines of:
xcopy C:\BLAH D:\BACKUP\'date /T'

I know you can print the current date by simply typing 'date /T'. However, I can't remember how variables work in batch files :p
 
That could help with the rest of the script, thanks :)

Just came up with this:
xcopy C:\ABC C:\%date:~-10,2%-%date:~-7,2%-%date:~-4,4%\ /E /Y /R

Works pefectly :)

Thanks for the help/ideas ;)
 
Using the following now in case you're interested - it includes the time (with seconds) so multiple backups can be made in the same day ;)

Code:
@echo off
xcopy "C:\Copy From here" "D:\copy to here\%date:~-10,2%-%date:~-7,2%-%date:~-4,4%_%time:~-10,1%-%time:~-8,2%-%time:~-5,2%\" /E /Y /R

:)
 
Back
Top Bottom