Board logo

标题: [文件操作] 批处理复制文件为何出现报错找不到指定文件? [打印本页]

作者: 那谁什么    时间: 2013-4-18 21:13     标题: 批处理复制文件为何出现报错找不到指定文件?

  1. @echo on
  2. set OgnPath="C:\Users\123\Desktop\resource"
  3. set DsnPath="C:\Users\123\Desktop\destination"
  4. for /d %%i in (*) do (
  5. copy /y "%OgnPath%\%%i\*name*.txt %DsnPath%\%%i
  6. )
  7. pause
复制代码

作者: 那谁什么    时间: 2013-4-18 21:15

报错:System cannot find the file specified.
该咋解决,,谢谢大神们!!!
作者: Batcher    时间: 2013-4-18 21:31

  1. @echo off
  2. set "OgnPath=C:\Users\123\Desktop\resource"
  3. set "DsnPath=C:\Users\123\Desktop\destination"
  4. cd /d "%OgnPath%"
  5. for /d %%i in (*) do (
  6.     copy /y "%OgnPath%\%%i\*name*.txt" "%DsnPath%\%%i"
  7. )
  8. pause
复制代码

作者: 那谁什么    时间: 2013-4-18 21:43

回复 3# Batcher


    谢谢你,我知道我的出错问题啦,真心感谢!!!




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2