how to display only status of ping result like this- here is "My serverx is...fixed only change the online / offline status.
** My server1 is .... online
** My server2 is .... online
** My server3 is .... offline
i was try to this..but fail
@echo off
ping My server1|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 echo Success
IF ERRORLEVEL 1 echo Fail
ping My server2|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 echo Success
IF ERRORLEVEL 1 echo Fail
ping My server3|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 echo Success
IF ERRORLEVEL 1 echo Fail
echo My server1 is ....%ver%
echo My server2 is ....%ver%
echo My server3 is ....%ver%
how to set variable here to do like this.
thanks.