try this...

Code:

$num = 5
Shell '%comspec% /c ping -n $num 10.10.0.87 | find "TTL=" > nul'
If not @ERROR
? "At lease one ping out of $num was good"
Else
? "no ping reply"
EndIf



as long as the FIND command finds one item, @error = 0