Solved

Test if site exists from Windows command line.

Posted on 2006-07-19
3
269 Views
Last Modified: 2010-03-19
I need to be able to find out if a specific site exists via the Windows CLI.
At first I was just using ping.
ping www.google.com
that shows me that www.google.com exists. But if I try say:
ping www.google.com/linux
then I get a "host not found" error even though I know that www.google.com/linux exists.

So obviously ping will not work. In the end I am trying to write a .BAT file where I can put in a domain name and it will automatically check if certain things exist. Like I can put in www.example.com and it will check for the existence of:
www.example.com/scripts
www.example.com/flash
www.example.com/old

What would be the best tool or technique to do this with? It has to be from the windows command line and I have to be able to automate it. I am not averse to downloading small utilities to call from the script but they have to be free and/or open source.

Thanks.
0
Comment
Question by:xy8088
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Dbergert earned 500 total points
ID: 17140927
ping uses ICMP and you are trying to use HTTP/..

you need wget for windows.   http://wget.techknight.com/

then you can run

wget http://wget.techknight.com/test.htm


0
 
LVL 3

Author Comment

by:xy8088
ID: 17140994
Awesome. Using "wget --spider -nv" does pretty much what I need. Thanks!
0
 
LVL 5

Expert Comment

by:Dbergert
ID: 17141035
Np, have a good one.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
extend vlan through a layer 3 connection 31 148
integration of incident management and linking to CMDB 1 43
eigrp routing loop 5 43
Home lab datacenter 9 54
#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question