NJudson
Who farted?
- Local time
- Today, 15:30
- Joined
- Feb 14, 2002
- Messages
- 297
I've been trying to search for an answer but haven't had any luck. What I'm trying to to is loop through a text file but not sure what the correct syntax is to do so. I've worked down through a text file like such:
open "c:\textfile.txt" for input as #1
do until EOF (1)
Line Input #1, a
---Code---
Loop
close #1
Let's say I've reach the half-way point down the text file, how can I return back to the beginning of the file? Should be simple but I'm not finding the answer anywhere.
Currently the only way I can do this is to close the text file then re-open it, but I don't want to do this hundreds or thousands of times through my main code. Thanks for any suggestions.
open "c:\textfile.txt" for input as #1
do until EOF (1)
Line Input #1, a
---Code---
Loop
close #1
Let's say I've reach the half-way point down the text file, how can I return back to the beginning of the file? Should be simple but I'm not finding the answer anywhere.
Currently the only way I can do this is to close the text file then re-open it, but I don't want to do this hundreds or thousands of times through my main code. Thanks for any suggestions.