bat 输出本地ip的方法

47 阅读1分钟

bat 输出本地 ip 的方法

@echo off
for /f "tokens=4" %%a in ('route print^|findstr 0.0.0.0.*0.0.0.0') do (
 set IP=%%a
)
echo