Skip to content

Instantly share code, notes, and snippets.

@melwinm
Created January 11, 2013 19:32
Show Gist options
  • Save melwinm/4513316 to your computer and use it in GitHub Desktop.
Save melwinm/4513316 to your computer and use it in GitHub Desktop.
Very simple backup batch script based on xcopy. xcopy /D parameter makes it fast because only new files will copied.
REM replace a, b, c, ... with your source paths
set sourceFileList=(^
a ^
b ^
c ^
)
REM replace t with your target directory
set targetDir=t
for %%i in %sourceFileList% do ( XCOPY %%i %targetDir% /D /E /C /Y /L )
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment