本帖最后由 aloha20200628 于 2024-10-26 17:39 编辑
回复 1# mnokoko
新建变量名前缀#字符作为变量名统一标识以便于提取...
- @echo off &setlocal enabledelayedexpansion
- for /f "tokens=1,2 delims=[_=]" %%a in (
- 'findstr /ib "[information_ item= software=" "config.ini" ') do (
- if /i "%%a"=="information" (set "n=%%b") else (
- set "b=%%b" &set "b=!b:\\=\!" &set "#%%a!n!=!b!")
- )
- set #
- endlocal&pause&exit/b
复制代码
|