Discussion Locked

VB6: Creating TOC for ASCII Files

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Quick question -- Can I get VB6 to do this: I have a directory of reports saved as ASCII files. I'd like to create a table of contents showing file name, date created, and file size. Not too hard. But, here's the twist. I need to read and parse the headers so that I can get the title of the report and total number of pages. I'd like to copy these files montly to a CD for archiving purposes. Thanks! (I don't think it's a difficult question, but I'm making the points high anyway.)

3 replies

by seagull data services

It depends on the structure of the text file.
Is the header the first thing on the first page?
Does the report include page numbers?
Is the page number the last item on the last page of the report?
Does the page number include the number of pages (e.g. Page 1 of 3) on each page?
Does the output file include formfeed characters or linefeeds to go to the next page and, if the latter, how many lines per page?
Once you've figured out where to get the information, you just need to read into each report file and output it to your toc file.
What type of toc file will you be using?

This discussion is closed to new replies.