fenglin124 当前离线
上等兵
评分人数
CrLf 当前离线
论坛巡查
@echo off&setlocal enabledelayedexpansion set /p n=数量 (for /f %%a in (test.txt) do ( set /a max=%%a+n-1 for /l %%b in (%%a 1 !max!) do set /p=%%b echo; ))<nul>结果.txt pause复制代码
TOP
batman 当前离线
考官
荣誉版主
@echo off&setlocal enabledelayedexpansion set /p num=请输入: (for /f %%a in (test.txt) do ( set /a max=%%a+num-1 for /l %%b in (%%a,1,!max!) do set "str=!str! %%b" echo !str:~1!&set "str=" ))>new.txt start new.txt复制代码
@echo off&setlocal enabledelayedexpansion set /p n=数量 (for /f %%a in (test.txt) do ( set /a max=%%a+n-1 for /l %%b in (%%a 1 !max!) do set /p=%%b echo; ))>结果.txt pause复制代码
@echo off&setlocal enabledelayedexpansion set /p num=请输入: (for /f %%a in (test.txt) do ( set /a max=%%a+num-1 for /l %%b in (%%a,1,!max!) do set /p=%%b <nul echo, ))>new.txt start new.txt复制代码