A small app to gather specific lines from files

Here’s a small app that I wrote to help out Pat Gilbert over on the ZTree support forums.

And I quote: http://www.ztw3.com/archive/020/archive.cgi?read=72807

> What I need to do is to “gather” the 3rd & 4th lines of text
> from a set of files and write them to a temporary file for further
> processing. Ideally I would like them appended to the temp file without
> additional LFCR at the end of each gather.

I sometimes give myself a 15 minute project to write on Monday mornings to clear my brain and get my mind into the right mode. I REALLY needed that this morning, so I threw this together. With testing, I exeeded my 15 minute time limit by 5 minutes, so you’ll need to figure out how to use it yourself, but here:
http://the-wildwest.com/Queeg/Batches/GatherLines.exe

Click the ChangeDirectory button to populate that edit box with the currend path.

Save to file will save a file called Gathered.txt to the current directory (which is probably where you are gathering lines from.).

It could be MUCH more efficient and if you are working with Largish files, it will be slow (for convenience I load the whole file), but like I said, I had 15 minutes.

Maybe it will help…

Add a Comment

Your email address will not be published. Required fields are marked *