在for /f中skip的值不能为0,即不能是小于1的整数
如果你需要=0的情况,可以这样做:
set path1=d:\凡人修仙传.txt
set /p hang1=
set /a hang1=%hang1%-1
if %hang1% lss 1 (
for /f "delims=: tokens=1,2*" %%a in ('findstr /n ".*" %path1%') do echo %%b
) else (
for /f "skip=%hang1% delims=: tokens=1,2*" %%a in ('findstr /n ".*" %path1%') do echo %%b
>>更新.txt
Last edited by Hanyeguxing on 2009-9-4 at 05:57 ]