我想使用robocopy移动大量文件,但白名单中的文件除外。白名单包含大约150个不同名称的文件。当我将白名单的文件名复制并粘贴到命令行中时(使用/xf
参数),robocopy将截断该列表。
c:\test> robocopy src dest *.ext /xf exclude1.ext exclude2.ext exclude3.ext ... exclude 299.ext exclude300.ext
结果是:
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Fri May 24 14:09:31 2013
Source : C:\test\src\
Dest : C:\test\dest\
Files : *.ext
Exc Files : exclude1.ext
exclude2.ext
exclude3.ext
....
....
exclude200.ext
exclude201.ext
exclu
然后:
'exclude250.ext' is not recognized as an internal or external command,
operable program or batch file.
'exclude251.ext' is not recognized as an internal or external command,
operable program or batch file.
'exclude252.ext' is not recognized as an internal or external command,
operable program or batch file.
'exclude253.ext' is not recognized as an internal or external command,
operable program or batch file.
不幸的是,白名单中的文件是手工挑选的,不能用通配符过滤。
有办法解决这个问题吗?