@echo off
for /f "delims=" %%i in (t.txt) do (
set "str=%%i"
echo %%i
setlocal enabledelayedexpansion
if "!str: =!"=="endif" set /a num+=1
if !num!==1 if /i "!str: =!"=="endif" echo x = GetSysConfigOption()
endlocal
)
pause
略去 endlocal
@echo off
for /f "delims=" %%i in (t.txt) do (
set "str=%%i"
echo %%i
setlocal enabledelayedexpansion
if "!str!"=="end if" set /a num+=1
if !num!==1 if /i "!str!"=="end if" echo x = GetSysConfigOption(^)
)
pause
[ Last edited by terse on 2007-10-26 at 10:48 PM ]
@echo off
for /f "delims=" %%i in (t.txt) do (
set "str=%%i"
echo %%i
setlocal enabledelayedexpansion
if "!str: =!"=="endif" set /a num+=1
if !num!==1 if /i "!str: =!"=="endif" (
echo x = GetSysConfigOption(^)
echo Set obj = Nothing
)
endlocal
)
pause
[ Last edited by xing3019 on 2007-10-26 at 10:53 PM ]
@echo off
for /f "delims=" %%i in (t.txt) do (
echo %%i
if "%%i"=="end if" call :stra
)
pause
goto :eof
:stra
set /a num+=1
if %num% equ 1 (echo x = GetSysConfigOption(^)
echo Set obj = Nothing
)
Originally posted by terse at 2007-10-27 08:57 PM:
@echo off
for /f "delims=" %%i in (t.txt) do (
echo %%i
if "%%i"=="end if" call :stra
)
pause
goto :eof
:stra
set /a num+=1
if %num% equ 1 (echo x = GetSysC ...
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (t.txt) do (
echo %%i
set "str=%%i"
if "!str: =!"=="endif" call :stra
)
pause
goto :eof
:stra
set /a num+=1
if !num! equ 1 (echo x = GetSysConfigOption(^)
echo Set obj = Nothing
)
[ Last edited by terse on 2007-10-28 at 12:20 AM ]