1、打开记事本
2、把以下内容粘贴进去@echo off for /f tokens^=2^ delims^=^" %%i in ('wmic nicconfig get ipaddress ^|findstr /i "192"') do set ip=%%i echo %ip%pause
3、保存文件为text.bat,文件类型为所有文件。
4、运行测试
1、打开记事本
2、把以下内容粘贴进去@echo off for /f tokens^=2^ delims^=^" %%i in ('wmic nicconfig get ipaddress ^|findstr /i "192"') do set ip=%%i echo %ip%pause
3、保存文件为text.bat,文件类型为所有文件。
4、运行测试