xcopy可以- @echo off & setlocal enabledelayedexpansion
- rem 保存为ANSI格式
- set "source=d:\123\"
- set "destination=d:\abc\"
- for /f "delims=" %%a in (list.txt) do (
- if "%%~xa"=="" ( set "str=%%a.*" ) else set "str=%%a"
- for /f "delims=" %%i in ('dir /b /s /a-d "%source%!str!"') do (
- set "ph=%%~dpi"
- xcopy /y "%%i" "%destination%!ph:*%source%=!" >nul
- )
- )
- pause
复制代码
|