- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /c:"IP Address"') do set "ip=%%i"
- set "ip=%ip:~1%"
- for /f "delims=" %%a in ('type a.inf') do (
- set /a n+=1
- if !n! equ 1 (
- echo %%a>a.inf
- ) else (
- if !n! equ 6 (
- echo PublicIP = %ip%>>a.inf
- ) else (
- echo.%%a>>a.inf
- )
- )
- )
- start a.inf
复制代码
[ 本帖最后由 batman 于 2008-8-15 11:37 编辑 ] |