Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21256

Newby - Large TXT file manipulation methods and reference lookup file

$
0
0
I need a functionality starting push as it has been quite a few years since I done any programming.

I have a large txt file containing addresses which currently holds 720K lines, I also have a list of towns and the county they are in, this is currently in an Excel workbook but could be saved in another format, whatever is best.

Basically I want to increase the quality to the file through making County, Post Code and other information more complete.

What I am hung up on is reading and writing the file essentially line by line and inserting the County or other information if warranted, haven't got as far as looking up a second file yet, see code below.

I would imagine this is a simple program concept for the experienced so I am hoping for some pointers on a small scale to illustrate the best way forward.

I also wonder whether I should be reading the complete 720K lines into an array or something, making the adjustments and then writing the resulting modified file back out.

Thanks in advance for all information, pointers and examples.


Code:

Do While Not EOF(1)
Line Input #1, linedata
If Left(linedata, 5) = "TOWN:" Then
Call CheckCounty
Else
Print #2, linedata
End If
Loop


Viewing all articles
Browse latest Browse all 21256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>