Last active
June 13, 2021 05:45
-
-
Save raresteak/e22e690b6562883ebaffa14c5a72e5cd to your computer and use it in GitHub Desktop.
WindowsDesktopBackup.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rem Windows incremental backup of source to destination | |
Rem /D Copies files changed | |
Rem /E Copies directories and subdirectories, including empty ones. | |
Rem /Y Suppresses prompting to confirm you want to overwrite | |
Rem /I If destination does not exist and copying more than one file,assumes that destination must be a directory. | |
xcopy C:\Users\%username%\Documents\* E:\Backup\%computername%\%username%\Documents /D /E /Y /I | |
xcopy C:\Users\%username%\Desktop\* E:\Backup\%computername%\%username%\Desktop /D /E /Y /I | |
xcopy C:\Users\%username%\Downloads\* E:\Backup\%computername%\%username%\Downloads /D /E /Y /I |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment