我被指派复制Program Files文件夹中以及其所有子目录中的所有.txt文件到我创建的另一个文件夹中。 我使用的脚本如下:
xcopy c:\"program files"\*\*.txt c:\temp\myfiles\lessons
不想工作。我漏掉了什么?
我被指派复制Program Files文件夹中以及其所有子目录中的所有.txt文件到我创建的另一个文件夹中。 我使用的脚本如下:
xcopy c:\"program files"\*\*.txt c:\temp\myfiles\lessons
如果你想要保留文件夹的结构,
xcopy /s "c:\program files\*.txt" c:\temp\myfiles\lessons
如果不是这样,
for /r "c:\program files" %a in (*.txt) do @copy /y "%a" c:\temp\myfiles\lessons
xcopy "c:\program files\*\*.txt" c:\temp\myfiles\lessons
会发生什么? - Kevin