本帖最后由 terse 于 2014-9-19 15:39 编辑
- @echo off&setlocal enabledelayedexpansion
- set n=1001
- set f=!n:~-3!
- for /f "delims=" %%i in ('dir /b /a-d /on *.jpg') do (
- set str=%%~ni
- if /i "!str:~-1!" == "D" (
- set /a n+=1
- set f=!n:~-3!
- ) else if /i "!str:~-1!" == "B" set f=A
- md "!f!" 2>nul
- if !f! == A (copy "%%i" "!f!") else move "%%i" "!f!"
- if /i "!str:~-1!" == "C" set f=!n:~-3!
- )
- pause
复制代码
|