@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (a.txt) do (
set /a n+=1
if !n! equ 1001 echo 写入完成&pause>nul&goto :eof
echo %%i>>2.bat
)
[ Last edited by zw19750516 on 2008-5-7 at 10:44 PM ]
@echo off&SetLocal ENABLEDELAYEDEXPANSION
if "%1"=="" (goto --help) else (set file=%~s1)
if "%2"=="" (set first="delims=: tokens=1*") else (set first="skip=%2 delims=: tokens=1*")
if "%3"=="" (
for /f %first% %%a in ('findstr /n .* %file%') do echo/%%b
goto :EOF
)
set last=%3
set loop=0
for /f %first% %%a in ('findstr/n .* %file%') do (
if not defined lxmxn (echo/%%b&set /a loop+=1) else (goto :EOF)
if "!loop!"=="%last%" set lxmxn=Nothing
)
GOTO :EOF