- @echo off & cd /d "%~dp0"
- setlocal enabledelayedexpansion
- set "min="
- set "no=1" & mkdir "1" >nul 2>nul
- for /f "delims=" %%i in ('dir /b /a-d /os') do (
- echo %%~zi %%~i
- if "!min!"=="" set "min=%%~zi"
- set /a "cur=%%~zi-min"
- if !cur! gtr 2048 (
- set "min=%%~zi"
- set /a "no+=1"
- mkdir "!no!" >nul 2>nul
- echo -------- !min! ---------
- )
- if /i not "%%~nxi"=="%~nx0" move "%%i" "!no!\" >nul
- )
- pause&exit
复制代码
|