Skip to content

Batch script to get your IP address

  • by

With this batch script you can get your local IP address and store it in a varialbe.

FOR /F "tokens=4 delims= " %%i in ('route print ^| find " 0.0.0.0"') do set localIp=%%i
echo Your IP Address is: %localIp%

save this to a file with the .bat extension. When running this script your local IP will be saved to a variable and printed

Leave a Reply

Your email address will not be published.