Quick Tips

Ping Sweep Using DOS Commands

|
When I want to find out what machines are on my local network, I have always relied on tools such as Angry IP Scanner or Look@LAN (XP).  Recently I could not get Look@LAN working properly on a 64-Bit Windows 7 machine, I kept getting crashes or errors.  I ended up finding and alternative they have made, called fing for Desktop.  They have great GUI versions for IOS and Android, but no GUI for windows.  However, they did have the command line version, which is better in some respects but not as easy to start out with.  I'll write more about that in another post.

I wanted to look for something simpler and I started to write my own script, but figured I can find it online.  I've looked in the past but never found one that was simple enough.  Recently, I found a very simple one line command by YouFooBar.  I couldn't believe how simple it was once I saw it.

New to FrugalNYC's FrugalTech?  Enjoy more free content by Clicking here to add this to your RSS reader or Subscribe to FrugalTech by Email.

In short, the command is:

FOR /L %i in (1,1,255) do @ping -n 1 -w 200 192.168.1.%i | find "Reply"

This command will skip any non-responding systems and give us the "alive" systems on the local subnet.
You can put the above command in a batch file (make sure to add the extra % in front of %i) and redirect output etc..

For additional links to tips and tricks follow me on Twitter. If you would like to contribute to FrugalNYC or FrugalTech in any way, contact me via email. Click here to add this to your RSS reader or Subscribe to FrugalTech by Email.

No comments:

Post a Comment