[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文件操作] 批处理复制文件为何出现报错找不到指定文件?

  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
复制代码

报错:System cannot find the file specified.
该咋解决,,谢谢大神们!!!

TOP

  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
复制代码
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 3# Batcher


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

TOP

返回列表