回复 3# feixiang8209 - @echo off & setlocal enabledelayedexpansion
-
- :main
- for /R %%i in (*.png) do (
- for /F "tokens=4,5 delims=-" %%j in ("%%i") do (
- set "SJ=%%j"
- if "!SJ:~0,2!"=="SJ" ('
- md "%%j"
- echo move "%%i" "%%j\"
- )
- set "SJ=%%k"
- if "!SJ:~0,2!"=="SJ" (
- md "%%k"
- echo move "%%i" "%%k\"
- )
- )
- )
- pause
- goto:eof
复制代码 确认无误后删掉echo
我不是很懂move的想法,建议先备份文件 |