::文件非空行数:
findstr/n . list.txt|find /c /v ""
::文件总行数(包括空行):
type list.txt|find /c /v ""
::另一种方法
@echo off&setlocal enabledelayedexpansion
for /f " delims=:" %%i in ('findstr /n .* "123.txt"') do set var=%%i
echo %var%
::文件非空行数:
findstr/n . list.txt|find /c /v ""
::文件总行数(包括空行):
type list.txt|find /c /v ""
::另一种方法
@echo off&setlocal enabledelayedexpansion
for /f " delims=:" %%i in ('findstr /n .* "123.txt"') do set var=%%i
echo %var%
联系客服