Skip to content

Instantly share code, notes, and snippets.

@gdiggs gdiggs/backup.bat
Created Aug 1, 2015

Embed
What would you like to do?
@echo off
set drive=W:\BACKUP_docs
set musicdrive=W:\BACKUP_music
set backupcmd="C:\backup batches\wndsync.exe" /back /r /auto /showA
set cleancmd="C:\backup batches\dirclean.exe" -r -d -s
echo Started Backup: %date% - %time% >> w:\logs\backup.txt
echo ### Backing up Home Folder...
%cleancmd% -i "%drive%"
%backupcmd% "C:\users\gordon" "%drive%" /log0 w:\logs\docs.html
echo.
echo ### Backing Up Music...
%cleancmd% -i "%musicdrive%"
%backupcmd% d: %musicdrive% /log0 w:\logs\music.html
echo.
echo ### Backing Up Batch Files...
%backupcmd% "c:\backup batches" "%drive%\Batches"
echo.
echo ### Saving Log...
echo Finished Backup: %date% - %time% >> w:\logs\backup.txt
echo. >> w:\logs\backup.txt
echo.
echo ### Backup Complete...
shutdown /h
@pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.