Use Ip in a batch script

IPCONFIG |FIND “IP” > %temp%TEMPIP.txt
FOR /F “tokens=2 delims=:” %%a in (%temp%TEMPIP.txt) do set IP=%%a
del %temp%TEMPIP.txt
set IP=%IP:~1%
echo %IP% >%temp%ip.txt
echo The current IP address is “%IP%”

Comments

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)