是这样吗- for /f "tokens=1*" %%a in ('robocopy "%路径1%" "%路径2%" /e /xc /xn /xo /l /x /fp /NS /NJH /NJS ^| findstr /rb /c:"[ ]*新文件" /c:"[ ]*新目录"') do (
- set file=%%b
- setlocal enabledelayedexpansion
- call set "file2=%%file:!路径1!=!路径3!%%"
- for /f "tokens=*" %%f in ("!file2!") do (
- endlocal
- XCOPY "%%b" /Y /H /R "%%~dpf"
- )
- )
复制代码 回复 17# terse |