Computing.Net > Forums > Programming > batch file to parse text 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.

batch file to parse text file

Reply to Message Icon

Name: chaynik
Date: February 27, 2009 at 14:49:19 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

I need some help making a batch file than can parse a text file containing data on each line. At the same time, it needs to discard any "non-English" characters present. I'd like each line parsed to be assigned to a variable, and the blank lines to be assigned to a variable as well. Here's an example of a file to be parsed:

InPr }  Orange/Banana
Straweberry
"Grapefruit"
Cantaloupe
CTN-12:21

A Very Fruity Company Inc.
Gardener: Stephanie Fruity
Assistant: Josephine Peach
Waterer: Joe Onion
Contractor: Michael Potato
Curator: Phillip Seed


TY-F98-66-00147
© 2007 A Very Fruity Company Inc.  

So I would need to filter out the "InPr }  " in the first line, and the assign "Orange/Banana" to %fruit1% for example, then assign "Strawberry" to %fruit2%, etc. Every blank line would be assigned to %blankline1%, %blankline2%, etc.

Thank you very much in advance!




Sponsored Link
Ads by Google

Response Number 1
Name: chaynik
Date: April 28, 2009 at 23:18:03 Pacific
Reply:

Anyone?


0
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: batch file to parse text file

batch script to parse text file www.computing.net/answers/programming/batch-script-to-parse-text-file/16793.html

batch script for parsing text file www.computing.net/answers/programming/batch-script-for-parsing-text-file/18755.html

vbscript to parse text file and com www.computing.net/answers/programming/vbscript-to-parse-text-file-and-com/16691.html