Skip to content

Instantly share code, notes, and snippets.

@radleta
Created June 24, 2011 19:48
Show Gist options
  • Save radleta/1045529 to your computer and use it in GitHub Desktop.
Save radleta/1045529 to your computer and use it in GitHub Desktop.
ROBOCOPY.EXE "C:\Source" "C:\Destination" /MIR
SET ROBOCOPY_ERRORLEVEL=%ERRORLEVEL%
ECHO Error Level: %ROBOCOPY_ERRORLEVEL%
if %ROBOCOPY_ERRORLEVEL% == 1 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 2 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 3 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 4 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 5 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 6 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 7 set ROBOCOPY_ERRORLEVEL=0
if %ROBOCOPY_ERRORLEVEL% == 0 EXIT 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment