Results 1 to 3 of 3

Thread: Help!!! Faster Way to Read a file

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Olympia,Wa,USA
    Posts
    7
    Would like to find a better way to read the end of a file rather than using INPUT until i get to the end of the file and then reading it... waiting for input to reach the end of the file takes far too long..

  2. #2
    Member
    Join Date
    Feb 2000
    Location
    Toronto, Canada
    Posts
    44
    You have some data, like a list of FirstNames as an example, and you want to get the last entry as quick as possible. Try saving the list of names in reverse order. Therefore the first entry in the file will last firstName entered.

    Does this sound like a solution to your problem.

  3. #3
    New Member
    Join Date
    Apr 1999
    Posts
    9
    While your request is a tad ambiguous, there is certainly a way to position yourself to the end of any file that you have opened regardless of its size. You must open the file as BINARY for this to work.

    Sub MoveToEnd()

    Open "hugefile.txt" For Binary As #1

    Seek #1, Lof(#1) ' Moves you to the end of the file

    End Sub

    What you do from here is up to you. <g>

    I hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width