- set "listf=1.txt"
- set "so=C:\1\s"
- set "de=C:\1\d"
- setlocal enabledelayedexpansion
- set "so=%so%\"&set "de=%de%\"
- set "so=%so:\\=\%"&set "de=%de:\\=\%"
- for /f "delims=" %%i in ('type %listf%') do (
- if /i "%%i" gtr "%so%" (
- set "de=%%i"
- set "de=!de:%so%=%de%!"
- for %%a in ("!de!") do xcopy "%%i" "%%~dpa"
- )
- )
- pause
复制代码
|