【Dos】复制指定文件夹下所有文件到另外指定文件夹下

bat代码如下:

 1 @echo off
 2 @set /p fromFile=from:
 3 @set /p toFile=to:
 4 rem 找到所有文件
 5 dir /b /s %fromFile%\ *.gz >tmp
 6 rem 一个文件一个文件的处理
 7 for /f "delims=" %%x in (tmp) do (
 8 copy /y "%%x" %toFile%
 9 )
10 del tmp

使用截图:

猜你喜欢

转载自blog.csdn.net/qq_45533841/article/details/112180007
今日推荐