- @echo off&setlocal enabledelayedexpansion
- (for /f "delims=" %%a in ('type 1.reg') do if defined n (
- set "a=%%a"
- if "!a:~0,1!!a:~-1!"=="[]" goto:eof
- echo !a!
- ) else if /i "%%a"=="[HKEY_LOCAL_MACHINE\SOFTWARE\dzh\SuperStk\Market\HK]" set n==&echo %%a
- )>1-.reg
复制代码 或:- @echo off
- (for /f "delims=" %%a in ('type 1.reg') do if defined n (
- set "a=%%a"
- setlocal enabledelayedexpansion
- if "!a:~0,1!!a:~-1!"=="[]" goto:eof
- echo !a!
- endlocal
- ) else if /i "%%a"=="[HKEY_LOCAL_MACHINE\SOFTWARE\dzh\SuperStk\Market\HK]" set n==&echo %%a
- )>1-.reg
复制代码
[ 本帖最后由 hanyeguxing 于 2011-1-23 16:40 编辑 ] |