Skip to content
  • There is a 2013-era ps1 robocopy script at: https://gitlab.com/ltog/robocopy-backup

    Note also that "if you want robocopy to ignore all return codes under 8 (>= 8 means copy error)" you may need something like the following in your .cmd/.bat script:

    (robocopy src dst /mir) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0

    or the equivalent in Powershell

    robocopy src dest /mir; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }

    Below is example of log file created by MAP's robocopy script that shows command line options.

    
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------
    
      Started : Mon Oct 21 17:34:18 2019
    
       Source : D:\MassHunter\Data\2019\
         Dest : x:\Data\2019\
    
        Files : *.*
    	    
      Options : *.* /NDL /NFL /TEE /S /E /COPY:DAT /DCOPY:T /PURGE /MIR /NP /XJF /XJD /R:1000000 /W:30 
    
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    
                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :     30998     30998         0         0         0         0
       Files :    119242    119242         0         0         0         0
       Bytes : 138.923 g 138.923 g         0         0         0         0
       Times :   2:00:16   1:46:01                       0:00:00   0:14:14
    
    
       Speed :            23449086 Bytes/sec.
       Speed :            1341.767 MegaBytes/min.
    
       Ended : Mon Oct 21 19:34:34 2019
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment