Last active
September 25, 2022 22:39
-
-
Save DominikStyp/8b8e0d7ee04640e894e8ffda4519fc4c to your computer and use it in GitHub Desktop.
Batch (Windows): make directories backups with robocopy
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 cmd /c invokes command in CMD | |
REM cd /d J:\VIDEOS\ goes to the directory where the backup script lives | |
REM make-backup.bat invokes the backuping script in that directory | |
REM make backup for VIDEOS at disk J | |
cmd /c "cd /d J:\VIDEOS\ && dir && make-backup.bat" | |
REM make backup for VIDEOS at disk K | |
cmd /c "cd /d K:\VIDEOS\ && dir && make-backup.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 /MIR mirror backup, /R:5 5 retries, %cd% = current directory | |
REM COPY ALL THE FILES & DIRS IN THE CURRENT DIR TO "F:\VIDEOS_BACKUP" | |
robocopy "%cd%" "F:\VIDEOS_BACKUP" /MIR /R:5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment