借鉴了网上的一些案例,感谢百度贴吧的网友。
for /f tokens^=1^,2^ delims^=^,^" %%i in ('wmic nicconfig get IPAddress^,MACAddress^|find "."^|cscript -nologo -e:jscript "%tmp%\j.j"^| findstr "00:80:A3"') do set ip=%%~i
echo 网卡IP地址%ip%
借鉴了网上的一些案例,感谢百度贴吧的网友。
for /f tokens^=1^,2^ delims^=^,^" %%i in ('wmic nicconfig get IPAddress^,MACAddress^|find "."^|cscript -nologo -e:jscript "%tmp%\j.j"^| findstr "00:80:A3"') do set ip=%%~i
echo 网卡IP地址%ip%