78Views4Replies

Author Options:

I can not figure out why this batch file will not work!!!!!! Answered

@echo off
cd C:\Windows\System32
set addr=
set /p ADD=%addr%
ping http://www.%ADD%.com
pause>nul

It types the address correctly, but there is always an error to prevent it from pinging! Please Help!

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
kelseymh
kelseymh

Best Answer 8 years ago

|ping| doesn't take a URL as argument. It takes an IP address or a hostname. For example: ping www.instructables.com.

0
frollard
frollard

Answer 8 years ago

+1...nix the http://

0
Butterfingerz21
Butterfingerz21

Answer 8 years ago

Thank you so much!! It was really bugging me that i couldn't figure out how to make it work!

0
frollard
frollard

Answer 8 years ago

If it works, make sure to mark the question answered!