【Dos】複製指定文件夾下全部文件到另外指定文件夾下

bat代碼以下:spa

 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

使用截圖:code

相關文章
相關標籤/搜索