Friday, March 23, 2012

How to check IP PING results automatically in Windows?

Write the following command in a file and save it as a .bat file in Windows.

FOR /L %i IN (1,1,20) DO ping -n 1 192.168.1.%i | FIND /i "Reply">> d:\ipreplies.txt

Run the .bat file and it will save the results to "d:\ipreplies.txt"

In the above FOR loop we check for the usage of IP's starting from 192.168.1.1 incremented by 1 to 192.168.1.20.

No comments:

Post a Comment