满足14楼需要,也可以少写一个for循环。- @echo off
- setlocal enabledelayedexpansion
- for /f "useback tokens=1-4* delims=," %%a in (`type "1.csv" ^& echo 1^,1000`) do (
- if defined n (
- set /a m=%%b-1
- md "!f!"
- for /l %%l in (!n!,1,!m!) do (
- set k=00%%l
- if exist "!k:~-3!.jpg" (
- move "!k:~-3!.jpg" "!f!"
- )
- )
- )
- set n=%%b
- set f=%%a%%b%%c%%d%%e
- )
- pause & exit
复制代码
|