Solved

Test if site exists from Windows command line.

Posted on 2006-07-19
3
268 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
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…
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…

943 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

4 Experts available now in Live!

Get 1:1 Help Now