- @echo off
- cd /d "%~dp0"
- for /l %%l in (0,1,9) do (
- for /f "delims=" %%i in ('2^>nul dir /b /a-d "*%%lp*.jpg"') do (
- set "n=#%%~ni"
- setlocal enabledelayedexpansion
- for /f "delims=|" %%d in ("!n:%%lp=|!") do (
- endlocal
- set folder=%%d%%lP
- setlocal enabledelayedexpansion
- md "!folder:~1!" 2>nul
- move "!n:~1!%%~xi" "!folder:~1!\"
- endlocal
- )
- )
- )
- pause
复制代码
|