直接统计总消费(不用excel):- @echo off
- :start ============================================================
- set/a _p=0,_s=0
-
- for /f "tokens=2 usebackq delims=@" %%a in ("01.txt") do (
- echo %%~a
- for /f "tokens=1,2 delims=." %%A in ("%%~a") do (set/a _p+=%%A,_s+=%%B 2>nul)
- )
-
- set/a "_p+=%_s:~0,-1%","_s=%_s:~-1%"
- echo.--------%_p%.%_s%--------
复制代码
|