日期:2014-05-17  浏览次数:20742 次

批处理:复制特定文件
目录:
  test\src\
  test\src\aaa.txt
  test\src\bbb.txt
  test\dest\

我在test\下新建一个 copy.bat:
  forfiles /P "/src" /C "if /I @file == aaa.txt xcopy /Y @file ..\dest"
提示:系统找不到指定的文件

其实是要拷贝不同的文件到不同的目录。

请朋友指点。

------解决方案--------------------
VBScript code

forfiles /p "src" /m "aaa.txt" /c "cmd /c copy /y @file ..\dest"