bat批量统计一个文件夹内所有文本的行数,并导出(软件也行)

有很多文本,现在需要把统计所有文本的行数并导出,导出形式:

a.txt 行数
b.txt 行数
c.txt 行数...
像这样统计每个文本有多少行

@echo off
rem 制作:第三象限04
rem 2015年11月3日
set tempfile=%temp%\tempfile.txt
set fextion=txt
if exist %tempfile% 1 0>%tempfile% 2>nul

for %%i in (*.%fextion%) do @(
set /p=%%i  <nul
type %%i|find /v "" /c
)>>%tempfile%
echo %cd%目录下所有.%fextion%信息已全部存入文%tempfile%
echo 是否查看
choice
if "%errorlevel%"=="2" pause&exit /b 0
type %tempfile%
pause

满意请采纳!

温馨提示:答案为网友推荐,仅供参考