回复 23# wqj - @echo off
- cd /d "%~dp0"
- setlocal enabledelayedexpansion
- set "MaxNum=2"
- for /l %%i in (1,1,10) do (
- md "%%i" 2>nul
- set "FileNum=0"
- for /l %%j in (10001,1,10999) do (
- set "FileSeq=%%j"
- set "FileSeq=!FileSeq:~-4!"
- if !FileNum! lss !MaxNum! (
- if exist "新!FileSeq!.jpg" (
- move "新!FileSeq!.jpg" "%%i\"
- set /a FileNum+=1
- ) else if exist "新!FileSeq!.jpeg" (
- move "新!FileSeq!.jpeg" "%%i\"
- set /a FileNum+=1
- ) else if exist "新!FileSeq!.png" (
- move "新!FileSeq!.png" "%%i\"
- set /a FileNum+=1
- ) else if exist "新!FileSeq!.bmp" (
- move "新!FileSeq!.bmp" "%%i\"
- set /a FileNum+=1
- )
- )
- )
- )
复制代码
|