Robocopy is now installed by default on Windows7 and Windows Server 2008
http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx
here is robocopy_fix.bat based on the code in the "Fixing Robocopy for SQL Server Jobs" article
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 | |
No comments:
Post a Comment