标题: [文件操作] 求助批处理复制文件到指定文件夹并覆盖 [打印本页]
作者: monter 时间: 2022-3-22 11:04 标题: 求助批处理复制文件到指定文件夹并覆盖
请求网友给与帮助,谢谢。
*.bat文件在X:\XX文件夹下,XX文件夹内有a文件夹和b文件夹,需要把b文件夹下的c.txt文件复制到a文件夹下,并覆盖c.txt文件。
作者: qixiaobin0715 时间: 2022-3-22 11:32
复制代码
作者: Batcher 时间: 2022-3-22 11:56
回复 1# monter
test1.bat- @echo off
- cd /d "%~dp0"
- copy /y "b\c.txt" "a\"
复制代码
test2.bat- @echo off
- copy /y "%~dp0b\c.txt" "%~dp0a\"
复制代码
作者: monter 时间: 2022-3-22 12:06
qixiaobin0715 发表于 2022-3-22 11:32
非常感谢,已经成功!
作者: monter 时间: 2022-3-22 12:10
回复 monter
test1.battest2.bat
Batcher 发表于 2022-3-22 11:56
非常感谢提供帮助
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |