How can I find an ip of a computer on my LAN then forward only the IP to another CMD command?

Hello,

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

Prof. Pickle says: Oct 27, 2012. 3:02 AM
If I am not mistaken, it displays the IP on the screen after it has been found, so:

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.
Tony_Bruke says: Aug 30, 2012. 1:38 AM
Sorry i can only answer the half of your question-'How can I find an ip of a computer on my LAN'. Try to use the IP-MAC Scanner can you get all ip addresses of the computers on your local network(both wire and wireless).
Sorry for my bad english.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!