1.

Solve : getting site ip in batch?

Answer»

how can i make a batch file that
first executes ping google.nl
than copys the site ip
than opens internet explorer
and then pastes it in the address bar with http:// before it?I'm a bit confused. If you already know the site name, why do you need to bring up the site with the IP address?

CODE: [Select]@echo off
for /f "tokens=3 delims=: " %%x in ('ping -n 1 google.nl ^| find /i "reply from"') do (
"c:\program files\internet explorer\iexplore" http://%%x
)

When requesting help for batch files, your OS is important. The code SNIPPET was WRITTEN for XP.



because of the filtering on my school...
and i know how to get the ip and PASTE it in the address bar, but i want it AUTOMATIC.



Discussion

No Comment Found