如何使用.bat文件搜索和复制文件?


Answers:


1

此批处理脚本将帮助您实现您的目标

@ECHO OFF
SET /P drive="Enter the drive letter"
FOR /R "%drive%:\" %%G IN (*.txt) DO (
ECHO COPY %%G W:\RestorePoint\%%~nG
)

我假设在此脚本中还原目录是“W:\ RestorePoint”,这是在运行脚本之前需要创建的目录。


如果你觉得我的答案很有帮助,请标记并upvote it :)谢谢你
Dhiwakar Ravikumar 2015年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.