Results 1 to 3 of 3

Thread: A Nice Colourful Ping

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    5

    A Nice Colourful Ping

    I've put the following into a .cmd file called NEWPING.CMD

    echo off & cls
    :top
    PING -n 1 %1% | FIND "TTL="
    IF ERRORLEVEL 1 (SET OUT=0C & echo Request timed out.) ELSE (SET OUT=0A)
    color %OUT%
    sleep 1
    GoTo top

    I then added the following custom tool:
    c:\windows\NewPing.CMD %HOSTNAME%

    This way you can select a bunch of servers, have a ping window open for each of them that goes green while the server is responding and red when they timeout.

    (Code is a modified version of Albin Sebastian's code that can be found at http://www.binbert.com/blog/2010/09/bat-file-for-continuous-ping-with-backgrou nd-colour-changes/

    [EDIT - Found a typo, code above corrected byt replacing %S% with %HOSTNAME%]

    [This message has been edited by Brinh123 (edited 06-16-2011).]

  2. #2
    Junior Member
    Join Date
    Jun 2008
    Posts
    7
    This may seem obvious to some, but the SLEEP command does not ship
    with WindowsXP; apparently it's available from within the Server 2003 Resource
    Kit.

  3. #3
    As each window opens by itself how do you know which server is which?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •