:- @echo off&setlocal enabledelayedexpansion
- ::code 随风 bbs.bathome.net 2008-04-20
- set "var=^(type a.txt^&echo.^&echo.^)^|findstr /o .*"
- for /f "tokens=1* delims=:" %%a in ('%var%') do (
- if defined n (
- set /a m=%%a-2-n
- set _!h!=第 !h! 行 有 !m! 字节
- )
- set /a n=%%a,h+=1
- )
- set /a h-=1,m-=1
- set _!h!=第 !h! 行 有 !m! 字节
- for /l %%a in (1 1 !h!) do echo !_%%a!
- pause
复制代码
|