the for command is the thing to use as whiteadmin said. this i think may simplify it.
+=+=+=+=+=+=+=+
net view >>all.txt
for /F "delims=\\" %%X in (all.txt) do ping -n 1 %%X |find /I "reply" >>pg.txt
for /F "tokens=3" %%Y in (pg.txt) do arp -a %%Y >>results.txt
notepad results.txt
+=+=+=+=+=+=+=+
the mfg is indicated by the first 3 numbers in the arp address (you can figure something out by yourself):
C:\>arp -a 10.0.1.88
Interface: 10.0.0.20 on Interface 0x1000003
Internet Address Physical Address Type
10.0.1.88 00-90-27-b0-be-7a dynamic
as you can see there's no need to echo the ip address as it's given in the return from ARP. (wasn't sure of that until i ran it)
------------------
for /L%%i in (2,1,50) do ping -n 1 192.168.1 %%i
echo--Host 211.26.167. %% >ip.txt
you dont have a space between /L amd %%i. you also need a "." after 192.168.1 and the echo will have to be used in a "for" loop for the variable (almost...%% is not a var ) to change. but you dont have to do that anyway




Reply With Quote