Skip to content

Instantly share code, notes, and snippets.

@stevehenderson
Created December 12, 2013 01:15
Show Gist options
  • Save stevehenderson/7921674 to your computer and use it in GitHub Desktop.
Save stevehenderson/7921674 to your computer and use it in GitHub Desktop.
Batch File to Synch External HDD
REM @echo off
CLS
REM CHANGE THE FOLLOWING FOR EACH SYSTEM
SET LocalPath=E:\Users\henderso\Documents\DSE
SET VBS2DEV=P:\vbs2\customer
Echo What is the external drive letter? (no colon needed)
REM PROMPT FOR EXTERNAL
set /p DriveLetter=
ECHO Copying from External to Local
XCOPY %DriveLetter%:\DSE %LocalPath% /D /E /C /R /H /I /K /Y /EXCLUDE:MyExcludes.txt
XCOPY %DriveLetter%:\vbs2_p\vbs2\customer %VBS2DEV% /D /E /C /R /H /I /K /Y /EXCLUDE:MyExcludes.txt
ECHO Copying from Local to External
XCOPY %LocalPath% %DriveLetter%:\DSE /D /E /C /R /H /I /K /Y /EXCLUDE:MyExcludes.txt
XCOPY %VBS2DEV% %DriveLetter%:\vbs2_p\vbs2\customer /D /E /C /R /H /I /K /Y /EXCLUDE:MyExcludes.txt
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment