Computing.Net > Forums > Programming > Extract IP address from txt file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Extract IP address from txt file

Reply to Message Icon

Name: jonez34
Date: January 30, 2006 at 09:18:50 Pacific
OS: windows 2000
CPU/Ram: 2.5 GHZ
Comment:

I am trying to construct a batch file that lets someone remotley execute either a command prompt or task manager. I have that part done but what I want to do is to be able to ask the person running the script if they need to resolve a hostname to ip if they do then they enter the computer hostname. From here I would like to have something like a "ping <hostname> >ping.txt" and then have the batch file parse the file looking for either the word Reply (as in Reply from x.x.x.x) or Request (as in Request timed out) and based on that it stores the IP address (if valid) into a variable that I can call at a later time. I know that I am going to have to use the FIND command but I have no idea how to use it correctly.

Thanks in advance.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Extract IP address from txt file

Extracting data out from txt file www.computing.net/answers/programming/extracting-data-out-from-txt-file-/20329.html

Pulling just IP Addresses from a Text File www.computing.net/answers/programming/pulling-just-ip-addresses-from-a-text-file/20056.html

Extracting variable from txt file? www.computing.net/answers/programming/extracting-variable-from-txt-file/10986.html