batch file to parse text file

February 27, 2009 at 14:49:19
Specs: Windows XP
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!



See More: batch file to parse text file

Report •


#1
April 28, 2009 at 23:18:03
Anyone?

Report •
Related Solutions


Ask Question