Peter,

Here's one way to do it. There has been much debate on what the find string should be for this technique ... anyone ? (j?):

code:

break on


$pings = 2
$machine = "shawn"


shell '%comspec% /c ping -n $pings $machine | find /i "received = $pings" >nul 2>nul'


if @error=0
?"$machine is alive"
else
?"$machine is dead or in trouble"
endif


exit


-Shawn

[ 02 August 2001: Message edited by: Shawn ]