Computing.Net > Forums > Windows 2000 > Batch script for parsing 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 script for parsing text file

Reply to Message Icon

Name: gromul
Date: November 7, 2005 at 21:35:58 Pacific
OS: XP PRO
CPU/Ram: AMD 2000+ / 1GB
Comment:

I need a script that will receive one text file as input and create another smaller text file from the first file. I think this can be done with find command, but I'm not sure how to proceed.

This is a simplified input file:

First line
<file1>
header
ignore
ignore
target1
target2

<file2>
header
ignore
target1

<file3>
header
ignore
ignore
target2
ignore

And the output file:

First line
<file1>
header
target1
target2

<file2>
header
target1

<file3>
header
target2



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: November 8, 2005 at 02:10:59 Pacific
Reply:

Your post is not fully clear... If the input file even if simplified is actually what showed, then the following suffices

Type In.txt | Find /V "ignore" > OUT.txt

If however that is a template of the *structure* of your file, then a more sophisticated command/script is needed and explanation too.


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 Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: Batch script for parsing text file

Script for parsing text files www.computing.net/answers/windows-2000/script-for-parsing-text-files/63459.html

batch file script (for command) www.computing.net/answers/windows-2000/batch-file-script-for-command/57333.html

Parsing a file using batch commands www.computing.net/answers/windows-2000/parsing-a-file-using-batch-commands/65055.html