I am struggling with how to handle a deploy script that sometimes returns a 2 during robocopy. The command and output are below.
It returns 2, which means "extra file".
It appears, overall, to be a success. Should I just accept 2 as being success?
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Tuesday, January 24, 2017 11:53:40 PM
Source : C:\Download\Temp\\
Dest : C:\Inetpub\\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /MT:8 /R:1000000 /W:30
------------------------------------------------------------------------------
*EXTRA File 689351 C:\Inetpub\\admin\dynamicfile2.zip
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 510 510 0 0 0 0
Files : 3564 0 3564 0 0 1
Bytes : 606.15 m 0 606.13 m 0 0 673.1 k
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Tuesday, January 24, 2017 11:53:40 PM
/Sand/Eare mutually exclusive?! The/EandPURGEare implied by the/MIR.DCOPYdoesn't have aDAflag?! If you intent is to mirror source and destination, a return code 2 (extra file) should be an error. - Lieven Keersmaekers