How can I find an ip of a computer on my LAN then forward only the IP to another CMD command?
I am currently writing a batch file that fully automates window's 7 msg.exe on my Local Area Network (LAN)
How can I, using nslookup, ping or similar, find the ip address of a computer on my local network and forward only the IP address i.e. 10.0.0.1 on to another command i.e.
nslookup gh0stm0nkeys | find "the IP Address of the desired PC" | another command here
where
nslookup gh0stm0nkeys - finds the ip
| find "the IP Address of the desired PC" - forwards the results to the "find" command, which then finds the IP of the computer
| another command here - i.e. i would save the results (which would only be the IP address) as a text file.
Any help in this matter is greatly appreciated.
Nathan





























Visit Our Store »
Go Pro Today »




Echo type the IP address here
set /p IP=
set num=0
:a
set /a num=%num%+1
IF EXIST IP%num%.txt goto a
echo %IP% > "IP%num%.txt
This will make a text file containing the text that you entered. The extra bits will ensure that it will not make two of the same files and give an error message.
Sorry for my bad english.