Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dalpert-korewireless/430caf462add85726fd7 to your computer and use it in GitHub Desktop.

Select an option

Save dalpert-korewireless/430caf462add85726fd7 to your computer and use it in GitHub Desktop.
robocopy [from] [to] /MIR
REM http://ss64.com/nt/robocopy-exit.html
IF %%ERRORLEVEL%% EQU 0 (
ECHO No errors occurred, and no copying was done; The source and destination directory trees are completely synchronized.
EXIT 0
)
IF %%ERRORLEVEL%% EQU 1 (
ECHO One or more files were copied successfully, new files have arrived.
EXIT 0
)
IF %%ERRORLEVEL%% EQU 2 (
ECHO Some Extra files or directories were detected. No files were copied.
EXIT 0
)
IF %%ERRORLEVEL%% GEQ 3 (
ECHO Robocopy Exit Codes: http://ss64.com/nt/robocopy-exit.html
EXIT %%ERRORLEVEL%%
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment