- @echo off&setlocal enabledelayedexpansion
- cmd /u/c echo;>2.$
- findstr/vrc:$ 2.$>1.$
- set n=1
- for /l %%a in (1 1 16) do (
- set /a "n+=(m=n)"
- set list=!n! !list!
- copy>nul /b !m!.$+!m!.$ !n!.$
- )
- for %%a in (test.txt) do (
- set /a z=0x10000-%%~za
- for %%b in (!list!1) do (
- if !z! gtr %%b (
- set /a "z-=%%b"
- copy /b test.txt+%%b.$ test.txt
- )
- )
- )
- copy /b test.txt+1.$ test.txt
- del /f /q *.$
- pause
复制代码
|