Solved

Test if site exists from Windows command line.

Posted on 2006-07-19
3
265 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
Comment Utility
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
Comment Utility
Awesome. Using "wget --spider -nv" does pretty much what I need. Thanks!
0
 
LVL 5

Expert Comment

by:Dbergert
Comment Utility
Np, have a good one.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now