Using Robocopy with PDQ Deploy

Follow

Comments

6 comments

  • Dany Demers

    You can use this information in a batch file to report the most serious anomalies, as follows:

     

    if errorlevel 16 echo ***FATAL ERROR*** & goto end

    if errorlevel 8 echo **FAILED COPIES** & goto end

    if errorlevel 4 echo *MISMATCHES* & goto end

    if errorlevel 2 echo EXTRA FILES & goto end

    if errorlevel 1 echo Copy successful & goto end

    if errorlevel 0 echo --no change-- & goto end

    :end

     

    Alternatively, full details of the return code could be reported as follows:

     

    if errorlevel 16 echo ***FATAL ERROR*** & goto end

    if errorlevel 15 echo FAIL MISM XTRA COPY & goto end

    if errorlevel 14 echo FAIL MISM XTRA & goto end

    if errorlevel 13 echo FAIL MISM COPY & goto end

    if errorlevel 12 echo FAIL MISM & goto end

    if errorlevel 11 echo FAIL XTRA COPY & goto end

    if errorlevel 10 echo FAIL XTRA & goto end

    if errorlevel 9 echo FAIL COPY & goto end

    if errorlevel 8 echo FAIL & goto end

    if errorlevel 7 echo MISM XTRA COPY & goto end

    if errorlevel 6 echo MISM XTRA & goto end

    if errorlevel 5 echo MISM COPY & goto end

    if errorlevel 4 echo MISM & goto end

    if errorlevel 3 echo XTRA COPY & goto end

    if errorlevel 2 echo XTRA & goto end

    if errorlevel 1 echo COPY & goto end

    if errorlevel 0 echo --no change-- & goto end

    :end

    0
    Comment actions Permalink
  • Shane Corellian

    Thanks for adding those, Dany. I had to come back to this post to reference these return codes. You're awesome.

    0
    Comment actions Permalink
  • Larry Coe

    Hi Shane,
    I am trying to use robocopy to copy a directory to students computers either to c:\program files but is not happening.
    my comand : - robocopy \uhsstore\stuffs\admin arsenal\notpad++ c:\program files\notepad++ runs OK reports succesfull but does not show as such nor does it land on target machines?
    please help

    thanks
    Larry

    0
    Comment actions Permalink
  • Adam Ruth

    Larry, you may want to try xcopy, it tends to be a bit more robust when run in the background.  Or, you could try redirecting the output from robocopy to a text file to see if it's giving a warning about why it's not doing aything:

    robocopy \uhsstore\stuffs\admin arsenal\notpad++ c:\program files\notepad++ >> c:\copy.log 2>&1

    (The log file will be created on the target computer, not your computer.)

    0
    Comment actions Permalink
  • Eduardo Trevino Jr.

    what os are you running on pcs deploying to?

    xp does not have robocopy.

    windows 7 8 no problem.

    0
    Comment actions Permalink
  • Eduardo Trevino Jr.

    mkdir c:\"program files"\notepad++

    xcopy \uhsstore\stuffs\admin arsenal\notpad++\*.* c:\"program files"\notepad++ /e /y

    will this help?

    0
    Comment actions Permalink

Article is closed for comments.