for /f "tokens=2 delims=:" %%i in ('ipconfig /all ^|find "IP Address"') do echo %%i>ip.txt
for /f "tokens=1 delims= " %%i in (ip.txt) do set ip=%%i
本文转自leonardos51CTO博客,原文链接: http://blog.51cto.com/leomars/1772903,如需转载请自行联系原作者
for /f "tokens=2 delims=:" %%i in ('ipconfig /all ^|find "IP Address"') do echo %%i>ip.txt
for /f "tokens=1 delims= " %%i in (ip.txt) do set ip=%%i
本文转自leonardos51CTO博客,原文链接: http://blog.51cto.com/leomars/1772903,如需转载请自行联系原作者