[求助]win7下如何在批处理中引用本机ip地址和网关地址

2024-12-01 03:38:31
推荐回答(3个)
回答1:

自动设置 ip吗?

回答2:

Ping 127.0.0.1

回答3:

@echo off
ipconfig
for /f "tokens=2 delims=:" %%i in ('ipconfig^|findstr /i "ipv4"') do set ip=%%i
ping %ip%