
CODE: [Copy to clipboard]@Echo Off&SetLocal EnableDelayedExpansion
set/p file=Please input the file you want to check:
if not defined file (echo Error&pause&exit/b)
if not exist "%file%" (echo Error&pause&exit/b)
for /f "delims=: tokens=1*" %%a in ('findstr /n .* "%file%"') do (
set b=&set a=%%b
if not "!a!"=="" (
for %%h in (!a!) do set /a b+=1
echo/Line %%a:!b! words
) else (echo/Line %%a:0 words)
)
pause
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |