[ Last edited by HAT on 2008-9-25 at 05:29 PM ]作者: terrytong 时间: 2008-9-25 18:11
Quote:
Originally posted by popdog2008 at 2008-9-25 17:15:
求一个自动获取本机ip和网关地址,然后ping的批处理,万分感谢
───────────────── 版务记录 ────────── ...
@echo off
for /f "delims=: tokens=1,2" %%a in ('ipconfig ^|findstr /i IP') do set IP=%%b
for /f "delims=: tokens=1,2" %%c in ('ipconfig ^|findstr /i gateway') do set GW=%%d
set IP=%IP: =%
set GW=%GW: =%
ping %IP%
pause作者: popdog2008 时间: 2008-9-26 08:55 万分感谢作者: hnjzsxn 时间: 2008-9-26 13:26 路过,学习作者: lxmxn 时间: 2008-9-26 19:39