- @echo off
- rem 批处理保存为ansi编码格式
-
- set "f=d:\指定位置"
-
- cd /d "%~dp0"
- if not exist "%f%" (
- md "%f%"
- )
- for /d %%d in (*) do (
- for /d %%e in ("%%d\*") do (
- setlocal
- call :1 "%%e" "%%~nxe"
- endlocal
- )
- )
- pause & exit
-
- :1
- if not exist "%f%\%~2%m%" (
- robocopy "%~1" "%f%\%~2%m%" /e /move
- exit /b
- )
- set /a n+=1001
- set m=%n:~-3%
- goto :1
复制代码
|