Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.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
Batch file 仅批量复制新文件_Batch File - Fatal编程技术网

Batch file 仅批量复制新文件

Batch file 仅批量复制新文件,batch-file,Batch File,我已经查看了copy和xcopy批处理命令。它们似乎都不支持“仅复制新文件而不考虑文件日期时间-仅比较名称”选项。请告知 /D /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destinati

我已经查看了copy和xcopy批处理命令。它们似乎都不支持“仅复制新文件而不考虑文件日期时间-仅比较名称”选项。请告知

/D

 /D:m-d-y     Copies files changed on or after the specified date.
              If no date is given, copies only those files whose
              source time is newer than the destination time.
编辑:你说的新是什么意思


编辑:你说的新是什么意思

也许你应该看看。它有一个Win32端口,它可以根据许多考虑因素复制文件,包括目标位置是否存在或不同

我想你想要这个开关:

--ignore-existing       skip updating files that exist on receiver

也许你应该看看。它有一个Win32端口,它可以根据许多考虑因素复制文件,包括目标位置是否存在或不同

我想你想要这个开关:

--ignore-existing       skip updating files that exist on receiver
看一看。使用以下开关调用它将递归地从
源目录
复制在
目标目录
中尚不存在的文件:

robocopy source_dir destination_dir /s /xc /xn /xo
有关开关的说明,请参阅。

请查看。使用以下开关调用它将递归地从
源目录
复制在
目标目录
中尚不存在的文件:

robocopy source_dir destination_dir /s /xc /xn /xo

有关开关的说明,请参阅。

对不起,我想要的是名称比较option@markattwood:因此,您只想复制目标中不存在的文件?完全正确。我一直在尝试循环。但这很痛苦。这很简单,但为什么微软不支持它。是的,这听起来很棘手。我没有答案。祝你好运:)@markattwood:基本上你只需要一个“永不覆盖”选项:(对不起,我要的是姓名比较option@markattwood:那么你只想复制目标中不存在的文件?没错。我一直在尝试循环。但这很痛苦。这很简单,但为什么MS不支持它。是的,这听起来很棘手。我没有答案。祝你好运:)@马克特伍德:基本上,你只需要一个“永不覆盖”选项(可能涉及的对象:[code]FOR/D%%I IN(%OBTEMP%\Dir*)DO(FOR%%J IN(%%I\Bin*.DLL)DO(如果不存在%INSTALLDIR%\Bin\%%~nJ.DLL(复制%%J%INSTALLDIR%\Bin))[/code]如何在“添加注释”中格式化批处理代码文本?使用单回勾号,在大多数键盘上,键位于1/!因此
这是代码
。它是内联的,所以格式化更难。您可以回答自己的问题,这将为您提供所有格式化的可能性。它可能涉及的对象:[code]FOR/D%%I IN(%OBTEMP%\Dir*)DO(FOR%%J IN(%%I\Bin*.DLL)DO(如果不存在%INSTALLDIR%\bin\%%~nJ.DLL(复制%%J%INSTALLDIR%\bin))[/code]如何在“添加注释”中格式化批处理代码文本?使用单回勾号,在大多数键盘上,键位于1/!因此
这是code
。它是内联的,因此格式化更难。您可以回答自己的问题,这将为您提供所有格式化的可能性。