title: Batch script for checking if a server is online
body: <p>I basically want to have a windows batch script which goes through a list of servers and checks every server with a ping if it is online.
  The list of servers should be a simple plain text file and should look something like this:</p>
  
  <pre><code>...
  "Google" www.google.com
  "Node1" 221.12.123.1
  "Download Server" dl.myserver.com
  "Login Server" login.myserver.com
  ...
  </code></pre>
  
  <p>Here is a simple rundown what the program should do:  </p>
  
  <ol>
  <li>print a list of the descriptions of all the servers in the list to the screen.</li>
  <li>ping the first server server 4 times if one ping succeeds it should return online if all 4 pings fail it should return offline.</li>
  <li>print online or offline next to the first server in the printed list</li>
  <li>run step 2 and 3 for all other servers in the list.</li>
  </ol>
  
  <p>The output should look like the following:</p>
  
  <pre><code>...
  Google: online
  Stackoverflow: online
  Node1: online
  Download Server: offline
  Login server: offline
  ...
  </code></pre>
  
  <p>I just want to know if this is even possible in (windows) batch and how to do it. If it isn't possible in batch, what programming language should I use? Would it be possible to program this in Python?</p>
  
  <p>I would also be really thankful if anybody could post the code how to do this, Thanks!</p>