[Dos] Copy all files in the specified folder to another specified folder

The bat code is as follows:

1  @echo off
 2 @set /p fromFile = from:
 3 @set /p toFile = to:
 4  rem find all files
 5  dir /b /s %fromFile%\ *.gz> tmp
 6  rem Processing of one file one file
 7  for /f " delims= " %%x in (tmp) do (
 8 copy /y " %%x " %toFile%
 9  )
 10 del tmp

Use screenshots:

 

 

Guess you like

Origin blog.csdn.net/qq_45533841/article/details/112180007