本帖最后由 qixiaobin0715 于 2021-3-14 17:51 编辑
是这样吗- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('findstr "大厅经验" latest.log') do (
- set "str=%%a"
- set "str=!str:大厅经验=!"
- set "str=!str:+=!"
- set "str=!str:,=!"
- for %%b in (!str!) do set num=%%b
- set /a lastnum+=!num!
- )
- echo %lastnum%
- pause
复制代码
|