1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

bat script check ping output

Discussion in 'Shell Script' started by k2k, Aug 31, 2010.

  1. k2k

    k2k New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    i am trying to write a bat script to ping a machine if it is up.

    i am trying to do something like this

    if "ping xxxMachine | findstr reply" echo "xxxMachine is up"
    else echo "xxxMachine is down"
    the syntax is definitely wrong, does anyone know if this is doable with bat scripting?
     

Share This Page