Now I am going to past the complete output from the console.
C:\> ping 132.122.6.5
Pinging 132.122.6.5 with 32 bytes of data:
Reply from 132.122.6.5: bytes=32 time=1ms TTL=128
Reply from 132.122.6.5: bytes=32 time=26ms TTL=128
Reply from 132.122.6.5: bytes=32 time=2ms TTL=128
Reply from 132.122.6.5: bytes=32 time=1ms TTL=128
Ping statistics for 132.122.6.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 26ms, Average = 7ms
C:\> ping 132.122.6.4
Pinging 132.122.6.4 with 32 bytes of data:
Reply from 132.122.6.4: bytes=32 time<1ms TTL=128
Reply from 132.122.6.4: bytes=32 time<1ms TTL=128
Reply from 132.122.6.4: bytes=32 time<1ms TTL=128
Reply from 132.122.6.4: bytes=32 time<1ms TTL=128
Ping statistics for 132.122.6.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>"C:\Documents and Settings\alok.kumar\Desktop\test2.bat"
C:\>set ip=132.122.6.5 132.122.6.4
C:\>for %i in ("132.122.6.5 132.122.6.4") do (
ping -n 2 %i 1>nul
if errorlevel 1 (
echo Ping failed: %i
blat c:\emp.txt -to
[email protected] -subject "Agara is Down"
)
)
C:\>(
ping -n 2 "132.122.6.5 132.122.6.4" 1>nul
if errorlevel 1 (
echo Ping failed: "132.122.6.5 132.122.6.4"
blat c:\emp.txt -to
[email protected] -subject "Agara is Down"
)
)
Ping failed: "132.122.6.5 132.122.6.4"
Blat v2.6.1 w/GSS encryption (build : Nov 18 2006 11:59:59)
Sending c:\emp.txt to
[email protected]Subject: Agara is Down
Login name is
[email protected]You can very well see that both of the ip is pingable, but blat is running and sending back mail to me, regardless of complete success of both the i.p's.
hare krishna
Alok