none
Robocopy and scheduled task 0x3

    Question


  • I have a batch file that runs robocopy weekly.

    robocopy "D:\Database BU Transit"     "E:\HCNBUWeekly" /e /v /r:1 /w:1 /log:C:\Backup\logs\Weekly.log /np /nfl /ndl
    robocopy "D:\Database BU Transit"     "J:\HCN\BUWeekly" /e /v /r:1 /w:1 /log+:C:\Backup\logs\weekly.log /np /nfl /ndl

    When the robocopy finished I got Last Run Result 0x3. According to MS,

    ERROR_PATH_NOT_FOUND 3 (0x3) The system cannot find the path specified. But the robocopy worked fine!

    Task Scheduler successfully completed task "\Create Weekly Backup" , instance "{481d6347-b522-46b1-9a4c-70977be82eca}" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 3.

    In the log file. This seems that it worked fine. but I am not sure why I am getting 0x3 code from the last run result.


    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------

      Started : Sat Jul 12 23:30:00 2014

       Source : D:\Database BU Transit\
         Dest : E:\HCNBUWeekly\

        Files : *.*
            
      Options : *.* /V /NDL /NFL /S /E /COPY:DAT /NP /R:1 /W:1

    ------------------------------------------------------------------------------


    ------------------------------------------------------------------------------

                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :         1         0         1         0         0         0
       Files :         1         1         0         0         0         4
       Bytes :   2.486 g   2.486 g         0         0         0   9.155 g
       Times :   0:00:39   0:00:39                       0:00:00   0:00:00


       Speed :            67784952 Bytes/sec.
       Speed :            3878.686 MegaBytes/min.

       Ended : Sat Jul 12 23:30:39 2014

    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------

      Started : Sat Jul 12 23:30:39 2014

       Source : D:\Database BU Transit\
         Dest : J:\HCN\BUWeekly\

        Files : *.*
            
      Options : *.* /V /NDL /NFL /S /E /COPY:DAT /NP /R:1 /W:1

    ------------------------------------------------------------------------------


    ------------------------------------------------------------------------------

                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :         1         0         1         0         0         0
       Files :         1         1         0         0         0         8
       Bytes :   2.486 g   2.486 g         0         0         0  17.573 g
       Times :   0:01:31   0:01:31                       0:00:00   0:00:00


       Speed :            29267549 Bytes/sec.
       Speed :            1674.702 MegaBytes/min.

       Ended : Sat Jul 12 23:32:11 2014

    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------

      Started : Mon Jul 14 07:46:01 2014

       Source : E:\HCNBUWeekly\
         Dest : J:\HCN\BUWeekly\

        Files : *.*
            
      Options : *.* /V /NDL /NFL /S /E /COPY:DAT /NP /R:1 /W:1

    ------------------------------------------------------------------------------


    ------------------------------------------------------------------------------

                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :         1         0         1         0         0         0
       Files :         5         5         0         0         0         0
       Bytes :  11.642 g  11.642 g         0         0         0         0
       Times :   0:07:52   0:07:52                       0:00:00   0:00:00


       Speed :            26464739 Bytes/sec.
       Speed :            1514.324 MegaBytes/min.

       Ended : Mon Jul 14 07:53:53 2014

    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------

      Started : Tue Jul 15 07:00:50 2014

       Source : E:\HCNBUWeekly\
         Dest : J:\HCN\BUWeekly\

        Files : *.*
            
      Options : *.* /V /NDL /NFL /S /E /COPY:DAT /NP /R:1 /W:1

    ------------------------------------------------------------------------------


    ------------------------------------------------------------------------------

                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :         1         0         1         0         0         0
       Files :         5         5         0         0         0         0
       Bytes :  11.642 g  11.642 g         0         0         0         0
       Times :   0:08:10   0:08:10                       0:00:00   0:00:00


       Speed :            25497194 Bytes/sec.
       Speed :            1458.961 MegaBytes/min.

       Ended : Tue Jul 15 07:09:00 2014

    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------

      Started : Wed Jul 16 07:38:37 2014

       Source : E:\HCNBUWeekly\
         Dest : J:\HCN\BUWeekly\

        Files : *.*
            
      Options : *.* /V /NDL /NFL /S /E /COPY:DAT /NP /R:1 /W:1

    ------------------------------------------------------------------------------


    ------------------------------------------------------------------------------

                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :         1         0         1         0         0         0
       Files :         5         5         0         0         0         0
       Bytes :  11.642 g  11.642 g         0         0         0         0
       Times :   0:20:38   0:20:38                       0:00:00   0:00:00


       Speed :            10096282 Bytes/sec.
       Speed :             577.713 MegaBytes/min.

       Ended : Wed Jul 16 07:59:16 2014

    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------

      Started : Thu Jul 17 07:35:43 2014

       Source : E:\HCNBUWeekly\
         Dest : J:\HCN\BUWeekly\

        Files : *.*
            
      Options : *.* /V /NDL /NFL /S /E /COPY:DAT /NP /R:1 /W:1

    ------------------------------------------------------------------------------


    ------------------------------------------------------------------------------

                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :         1         0         1         0         0         0
       Files :         5         5         0         0         0         0
       Bytes :  11.642 g  11.642 g         0         0         0         0
       Times :   0:20:15   0:20:15                       0:00:00   0:00:00


       Speed :            10286800 Bytes/sec.
       Speed :             588.615 MegaBytes/min.

       Ended : Thu Jul 17 07:55:59 2014

    Thursday, July 17, 2014 2:26 AM

Answers

All replies

  • Any help?

    http://blogs.technet.com/b/deploymentguys/archive/2008/06/16/robocopy-exit-codes.aspx


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    • Proposed as answer by jrv Thursday, July 17, 2014 2:43 AM
    • Marked as answer by Bill_StewartModerator Thursday, July 17, 2014 2:10 PM
    Thursday, July 17, 2014 2:32 AM
    Moderator
  • Where is the option tab? I can't find the tab shown in the link you provided.
    Thursday, July 17, 2014 2:54 AM
  • The Option tab is on the deployment GUI they're using.

    The article explains why Robocopy can run successfully, but still have a non-zero return code.

    It also suggests using the /Log parameter to save the log to figure out exactly what it's doing.


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Thursday, July 17, 2014 3:22 AM
    Moderator
  • I would add that this is not a robocopy support forum.

    -- Bill Stewart [Bill_Stewart]

    Thursday, July 17, 2014 2:09 PM
    Moderator