Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scripting 机器人医疗;命令_Scripting_Batch File_Robocopy - Fatal编程技术网

Scripting 机器人医疗;命令

Scripting 机器人医疗;命令,scripting,batch-file,robocopy,Scripting,Batch File,Robocopy,我需要有关RoboCopy批处理文件的帮助。我有一个批处理文件要运行RoboCopy,以便将文件从服务器1复制到服务器2。我已包括/XO开关,以便仅复制新文件 复制文件后,对复制的文件运行命令。复制过程正常,但命令失败。我不知道我错过了什么( 非常感谢专家的帮助。以下是我的批处理文件: Robocopy作业C:\Robocopy\JOB2.RCJ 由用户名于2013年5月6日星期一14:11:19创建 源目录: /SD:\\Server1\Projects\MS480\RSL_PR1_D

我需要有关RoboCopy批处理文件的帮助。我有一个批处理文件要运行RoboCopy,以便将文件从服务器1复制到服务器2。我已包括/XO开关,以便仅复制新文件

复制文件后,对复制的文件运行命令。复制过程正常,但命令失败。我不知道我错过了什么(

非常感谢专家的帮助。以下是我的批处理文件:


Robocopy作业C:\Robocopy\JOB2.RCJ

由用户名于2013年5月6日星期一14:11:19创建

源目录:

   /SD:\\Server1\Projects\MS480\RSL_PR1_Data\LOFILE\    :: Source Directory.
   /DD:\\Server2\RoboCopy\Exp\  :: Destination Directory.
目标目录:

   /SD:\\Server1\Projects\MS480\RSL_PR1_Data\LOFILE\    :: Source Directory.
   /DD:\\Server2\RoboCopy\Exp\  :: Destination Directory.
包括以下文件:

   /IF      :: Include Files matching these names
    SystemOptions*.*
   /XF      :: eXclude Files matching these names
        :: eXclude no names (currently - Command Line may override)
   /XO      :: eXclude Older files.
排除以下目录:

   /XD      :: eXclude Directories matching these names
        :: eXclude no names (currently - Command Line may override)
排除这些文件:

   /IF      :: Include Files matching these names
    SystemOptions*.*
   /XF      :: eXclude Files matching these names
        :: eXclude no names (currently - Command Line may override)
   /XO      :: eXclude Older files.
复制选项:

   /COPYALL     :: COPY ALL file info (equivalent to /COPY:DATSOU).
   /FFT     :: assume FAT File Times (2-second granularity).
   /ZB      :: use restartable mode; if access denied use Backup mode.
重试选项:

   /R:5     :: number of Retries on failed copies: default 1 million.
   /W:5     :: Wait time between retries: default is 30 seconds.
   /V       :: produce Verbose output, showing skipped files.
   /TS      :: include source file Time Stamps in the output.
   /FP      :: include Full Pathname of files in the output.
   /NP      :: No Progress - don't display percentage copied.
   /LOG:C:\Desktop\RoboCopy\Systemsoptions-LO-FILE.txt  :: output status to LOG file (overwrite existing log).
   /TEE     :: output to console window, as well as the log file.
日志记录选项:

   /R:5     :: number of Retries on failed copies: default 1 million.
   /W:5     :: Wait time between retries: default is 30 seconds.
   /V       :: produce Verbose output, showing skipped files.
   /TS      :: include source file Time Stamps in the output.
   /FP      :: include Full Pathname of files in the output.
   /NP      :: No Progress - don't display percentage copied.
   /LOG:C:\Desktop\RoboCopy\Systemsoptions-LO-FILE.txt  :: output status to LOG file (overwrite existing log).
   /TEE     :: output to console window, as well as the log file.


那么您是说Robocopy按预期工作,但您在FOR-IN-DO命令方面遇到了问题

试试这个:

    FOR /f %%b in (C:\Desktop\RoboCopy\Systemsoptions-LO-FILE.txt) do CrCTool.exe %%b /a