qq570799 当前离线
列兵
wankoilz 当前离线
上尉
@echo off set/p x=输入行数: (for /f "delims=" %%i in (a.txt) do ( echo %%i set/a n+=1,m=n%%x,t=1/m 2>nul || echo AAAAAAAAA ))>b.txt复制代码
TOP
@echo off&setlocal enabledelayedexpansion md temp set/p x=输入行数: for %%i in (*.txt) do ( set n=0 (for /f "usebackq delims=" %%j in ("%%i") do ( set/a n+=1,m=n%%x echo %%j if !m! equ 0 echo AAAAAAAAA ))>temp\%%i )复制代码
fanfande 当前离线
中尉
@echo off&setlocal enabledelayedexpansion md temp set/p x=输入行数: set/p y=输入插入内容: for %%i in (*.txt) do ( set n=0 (for /f "usebackq delims=" %%j in ("%%i") do ( set/a n+=1,m=n%%x echo;%%j if !m! equ 0 echo !y! ))>temp\%%i )复制代码
原帖由 fanfande 于 2010-8-7 16:32 发表 楼主是每隔N行插入 固定内容 wankoilz 运行下来是插入了N行内容