Solved

Test if site exists from Windows command line.

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
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…

830 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