标签: windows batch-file
将具有相同名称的多个文件夹Xcopy复制到多个子目录
E:\ copytest \ AAAA \ 2
E:\ copytest \ BBBB \ 2
E:\ copytest \ randome \ 2
xcopy E:\copytest\new.txt E:\copytest\%%\2
答案 0 :(得分:0)
我想你想这样做
@ECHO OFF xcopy "E:\copytest\new.txt" "E:\copytest\aaaa\2" /z /i xcopy "E:\copytest\new.txt" "E:\copytest\bbbb\2" /z /i xcopy "E:\copytest\new.txt" "E:\copytest\randome\2" /z /i PAUSE
结帐this和this链接还记得您可以使用for循环更轻松。
如果要缩短代码,请尝试为E:\copytest\new.txt创建变量。
E:\copytest\new.txt