Computing.Net > Forums > Programming > delete known text 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.

delete known text from txt file

Reply to Message Icon

Name: Fritz.fx
Date: August 24, 2007 at 06:54:08 Pacific
OS: XP pro build 2600
CPU/Ram: AMD Athlon 3500+ 2gig
Product: home built
Comment:

I do hope I'm posting in the right place, (this type of forum is new to me)
If so, I have an XP batch file prob.
I'm trying to delete this from a text file

blank line (i dont want it)
blank line (i dont want it)
" " (
"170" " " THEN info I want to keep
" " THEN info I want to keep
" " THEN info I want to keep
" " THEN info I want to keep

my biggest prob is getting rid of the " and also with the size="2" (in a line i don't want) the 2 may be in some of the info i want to keep.
in a nutshell, I'm trying to pull nothing but the names on this page.
aaotracker.com/webspec/index.php?addr=203.123.67.169:1716
I've used wget to DL the page, and change.exe to strip it as much as i can, but am stuck on this particular prob.
Mechanix2Go seems to be the Guru with xp batch files, (from the MANY days I've spent looking for a solution,you have any ideas??



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: August 25, 2007 at 04:55:08 Pacific
Reply:

I got this msg from wget:

index.php@addr=203.123.67.169:1716: No such file or directory



=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: Fritz.fx
Date: September 11, 2007 at 04:25:04 Pacific
Reply:

I figured it out thanks M2 I decided to use "for /f tokens=blah" from the log file to get what i wanted, I'm a bit of a newb at this stuff and at first glance a line that contains "for /f %%a whatever" is pretty intimidating. (I sat there for ages thinking to myself "so, what is %%a" but it ALMOST makes sense once you get it to work for the first time.
thanks for your time anyway.

PS not sure why that address didn't work for you, does for me (s'pose I should have added http:// before it)

Cheers


0

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: delete known text from txt file

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

Win32: Reading a texts from a file www.computing.net/answers/programming/win32-reading-a-texts-from-a-file/11673.html

Read lines from .txt file in DOS? www.computing.net/answers/programming/read-lines-from-txt-file-in-dos/15219.html