2

我无法让 robocopy 的 /save 和 /job 选项正常工作。实际上 /save 选项似乎有效:

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

但是,当我尝试使用刚刚生成的作业文件时,出现错误:

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 !

为什么 robocopy 不能使用它刚刚创建的作业文件?

4

2 回答 2

1

您必须避免它robocopy jobfile位于网络共享上。

请注意作业的文件名和文件结尾。

命令行应该是:

robocopy /JOB:"driveletter:\-yourjobname-.rcj"
于 2014-05-27T10:56:15.793 回答
1

当您在命令行和 .rcj 文件中指定源/目标时,可能会发生 /job 的“无效参数”。

于 2013-04-18T16:09:06.230 回答