How to determine position within a text file under FSO model?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #16
    Hi killer42,
    Did you saw the zip file in #12, if that is okay then; i am ready to explain!

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #17
      Originally posted by hariharanmca
      Did you saw the zip file in #12, if that is okay then; i am ready to explain!
      Ok, I've just had a look now.

      I see it uses the "ReadAll, Split and Ubound" technique described in this thread. Thanks, it could be a useful technique for getting the count more quickly (I currently read line by line and count them). But it doesn't help in my case, as I want to avoid having to read the file and get the line count.

      I think I'll run with the idea that occurred to me while typing my earlier message. That is, get the file size up front by using the old-fashioned FileLen() function, then add up the length of each line as I process them (plus two for the delimiters) to track my position.

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #18
        Originally posted by Killer42
        Ok, I've just had a look now......
        This Seek function will return, how many text a streame read currently So we cannot get the how many line.

        We should use progress in timer control ( we can avoid to show each and every line status by changing the timer intervel).

        Comment

        Working...