- @echo off
- set n=3
- set "filename=a.txt"
- for /f "delims=" %%i in ('find /c /v "" ^<"%filename%"') do set /a m=%%i/3
- (for /l %%i in (1,1,%n%) do (
- (for /l %%j in (1,1,%m%) do (
- setlocal enabledelayedexpansion
- set/pstr=
- echo;!str!
- endlocal
- ))>%%i.txt
- ))<"%filename%"
复制代码
|