Networking

Dos commands and batch file for pinging hosts on local network. Outputs start and end time when run. %% is required in batch files. An @ symbol disables displaying the command when run, but does show the commmand's result. To scan 254 hosts takes 2 minutes.

DOS Commands for Pinging Hosts on Local Network

Scan for hosts on local network using command line.
>for /L %z in (1,1,254) do @ping 192.168.1.%z -w 10 -n 1 | find "Reply"

Scan for hosts on local network using command line with start and end time.
>time /T & (for /L %z in (1,1,254) do @ping 192.168.1.%z -w 10 -n 1 | find "Reply") & time /T

Dos Batch file with start and end time. in (1,1,254) means start, increment, end
@echo off
time /T & (for /L %%z in (1,1,254) do ping 192.168.1.%%z -w 10 -n 1 | find "Reply") & time /T