@echo off&setlocal enabledelayedexpansion
for %%i in (*.txt) do (
set "f=%%i"
for /f "usebackq delims=" %%j in ("!f!") do set/a n+=1
set/盯纯毕a n-=2
for /裤纤f "delims=" %%m in ('"type "!f!"|more +1& cd. 2^>!f!"') do set/凯芹a x+=1&if !x! leq !n! echo;%%m>>!f!
set/a n=0,x=0
)
pause