bat 隔N行输出序号为名的txt
栏目:实用记录
时间:2017-12-19 23:29
@echo off
setlocal EnableDelayedExpansion
set a=0
set b=0
md %cd%\shuchu\
for /f "delims=" %%a in (1.txt) do (
set /a a+=1
set /a a=!a!%%5
if !a!==0 (
set /a b+=1
)
echo %%a>>%cd%\shuchu\!b!.txt
)
讲解:间隔5行(%%5)输出!b!.txt