借用超版的代码哈:- @Echo Off&SetLocal EnableDelayedExpansion
- Set "Kg= "
- (For /f "Tokens=1-8 Delims=. " %%a in (a.txt) do (
- Set /a "a=(%%e-%%a)*(2<<23)+(%%f-%%b)*(2<<15)+(%%g-%%c)*(2<<7)+%%h-%%d+1,Num+=a
- Set Str1=%%a.%%b.%%c.%%d%Kg%
- Set Str2=%%e.%%f.%%g.%%h%Kg%
- Echo !Str1:~,17!!Str2:~,17!小计!a!个
- )
- Echo -------------------------------------------------------------------------
- Echo 统计结果总数为:!Num!个)>$
- Move $ a.txt&Start a.txt
复制代码
|