Hi there,
I am doing an access db and here is my problem:
I have text files that are all in this format:
"some kind of text" filename
"some more text" filename2
"blah blah" filename3
...
I have to go through these files line by line and compare the text in the quotes... I can do this fine, except for when the file does not end right after the last word. At the end of some of these files, there are a couple of returns or just some space on a couple lines below the last word.... so I get an error. There are hundreds and hundreds of these files, so it is definitely not possible to go through and delete this extra stuff, so I'm wonder if anyone has any suggestions?
The code I'm using looks like this for each of these text files:
inFile = FreeFile
Open path For Input As inFile
Do While Not EOF(inFile)
Input #inFile, Text, fName
...processing code goes here....
Loop
It works perfectly, but when there is extra space or returns at the end of the file it gives me an error saying "Input past end of file"
Does anyone have any suggestions? I would REALLY appreciate it!!
I am doing an access db and here is my problem:
I have text files that are all in this format:
"some kind of text" filename
"some more text" filename2
"blah blah" filename3
...
I have to go through these files line by line and compare the text in the quotes... I can do this fine, except for when the file does not end right after the last word. At the end of some of these files, there are a couple of returns or just some space on a couple lines below the last word.... so I get an error. There are hundreds and hundreds of these files, so it is definitely not possible to go through and delete this extra stuff, so I'm wonder if anyone has any suggestions?
The code I'm using looks like this for each of these text files:
inFile = FreeFile
Open path For Input As inFile
Do While Not EOF(inFile)
Input #inFile, Text, fName
...processing code goes here....
Loop
It works perfectly, but when there is extra space or returns at the end of the file it gives me an error saying "Input past end of file"
Does anyone have any suggestions? I would REALLY appreciate it!!