I can't get the -a switch to work for me,(Windows NT 4.0) but here's a batch file that will list the active IP addresses. Just change the base IP address after the "units:" label from
255.255.255.%2
to whatever range you want.
@echo off
if %1!==! goto start
if %1==h goto hundreds
if %1==t goto tens
if %1==u goto units
:start
echo Starting ping
echo Starting ping > pinglist.txt
for %%h in (0,1,2) do call %0 h %%h
goto end
:hundreds
for %%t in (0,1,2,3,4,5) do call %0 t %2%%t
goto end
:tens
for %%u in (0,1,2,3,4,5,6,7,8,9) do call %0 u %2%%u
goto end
:units
ping -n 1 255.255.255.%2|find "Reply from" >> pinglist.txt
IF %2!==259! type pinglist.txt | more
goto end
:LISTIT
type pinglist.txt | more
:end