First , You should make an effort and show us your try with your own code !
May be this can help you to construct your own code : How to Use an IP Address to Find a MAC Address
Dear Hacoo
Thanks for your gentle reply and here is my code
@echo off
echo All Information >"Hosts Info.txt"
echo. >>"Hosts Info.txt"
For /f %%d in (hosts.txt) do (
echo. %%d >>"Hosts Info.txt"
getmac /s %%d /v /nh >>"Hosts Info.txt"
ping %%d |find "Ping statistics for" >>"Hosts Info.txt"
echo._______________________________ >>"Hosts Info.txt"
)
pause
exit
but it's so dummied as I don't know but a few things about the batch programming, so I'm trying to do my best and I can't deal ever with many things like ( "tokens & delims" , " ~ " , " 1% " , " find "," findstr" ) What is these things means and how we use it
But I try to find what I want from some people's ideas and try to imitate them in some codes, but I do not reach the desired result most of the time due to my ignorance of most of the language of the batch files but I'm still trying to learn
- The previous getmac code give me the whole NIC MAC with manufacturere with many details For example:
Ethernet Intel(R) Ethern 8C-Df-D5-4e-a8-72 \Device\Tcpip_{817345F1-e93E-44D7-B19a-70F0f4F73Ec4}
and i want only tha mac address 8C-Df-D5-4e-a8-72
And The previous Ping code give me also the whole the Ping statistics result for Example :
Ping statistics for 172.217.17.238: and i just need the IP only like that 172.217.17.238
And finally if you can to help me to put all the results to gether in one line you are highly appretiated and if you won't also you are highly appretiated for the previous & gentle help