Created
June 2, 2011 00:10
-
-
Save house9/1003646 to your computer and use it in GitHub Desktop.
robocopy_fix.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem http://weblogs.sqlteam.com/robv/archive/2010/02/17/61106.aspx | |
robocopy %* | |
rem suppress successful robocopy exit statuses, only report genuine errors (bitmask 16 and 8 settings) | |
set/A errlev="%ERRORLEVEL% & 24" | |
rem exit batch file with errorlevel so SQL job can succeed or fail appropriately | |
exit/B %errlev% | |
rem USAGE: just like regular robocopy | |
robocopy_fix.bat C:\temp\s C:\temp\d /MIR | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment