第2个回答 2013-07-02
@echo off
for /f "delims=" %%i in ('dir /a-d /b *.txt') do (
set cnt=0
for /f "usebackq delims=" %%j in ("%%i") do set /a cnt+=1
set /a cnt-=2
call :sub %%i
)
exit
:sub
for /f "usebackq skip=%cnt% delims=" %%k in ("%~1") do echo,%%k>>ok.txt&goto :eof本回答被提问者采纳