robocopy /save and /job options

11,685

Solution 1

You have to avoid that the robocopy jobfile is on a network share.

Please attent to the filename of the job and the file ending.

The commandline should be:

robocopy /JOB:"driveletter:\-yourjobname-.rcj"

Solution 2

"Invalid parameter" for /job may happen when you specify the source/destination both in the command line and in the .rcj file.

Share:
11,685
user1443098
Author by

user1443098

Updated on June 15, 2022

Comments

  • user1443098
    user1443098 almost 2 years

    I'm having trouble getting robocopy's /save and /job options to work properly. Actually the /save option appears to work:

    robocopy c:\temp c:\tmp *.out /save:c:\tmp\rob1 /L
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
    -------------------------------------------------------------------------------
      Started : Wed Apr 03 11:36:48 2013
       Source : c:\temp\
         Dest : c:\tmp\
        Files : *.out
    
      Options : /L /COPY:DAT /R:1000000 /W:30
    ------------------------------------------------------------------------------
                           1    c:\temp\
          *EXTRA File              188    cd.out
          *EXTRA File            23126    dmidecode.out
          *EXTRA File             3102    foo.out
    ------------------------------------------------------------------------------
                    Total    Copied   Skipped  Mismatch    FAILED    Extras
         Dirs :         1         0         1         0         0         0
        Files :         1         0         1         0         0         3
        Bytes :     1.0 k         0     1.0 k         0         0    25.7 k
        Times :   0:00:00   0:00:00                       0:00:00   0:00:00
        Ended : Wed Apr 03 11:36:48 2013
    

    However, when I try to use the job file just generated, I get an error:

    robocopy c:\temp c:\tmp *.out /job:c:\tmp\rob1 /L
    Job File : C:\TMP\ROB1.RCJ
    ERROR : Invalid Job File, Line #11 :"/SD:c:\temp\"
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
    -------------------------------------------------------------------------------
      Started : Wed Apr 03 11:37:08 2013
       Source - c:\temp\
         Dest - c:\tmp\
        Files : *.out
    
      Options : /JOB /COPY:DAT /R:1000000 /W:30
    ------------------------------------------------------------------------------
    ERROR : Invalid Parameter #4 : "/job:c:\tmp\rob1"
           Simple Usage :: ROBOCOPY source destination /MIR
                 source :: Source Directory (drive:\path or \\server\share\path).
            destination :: Destination Dir  (drive:\path or \\server\share\path).
                   /MIR :: Mirror a complete directory tree.
        For more usage information run ROBOCOPY /? or read Robocopy.Doc.
    NOTE: Read "True Replication" in Robocopy.Doc prior to first use of /MIR !
    ****  /MIR can DELETE files as well as copy them !
    

    Why can't robocopy use the job file it just created?