View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default FileSystemObject to get last 10 lines of text file.

I searched google in the *scripting* newsgroup and found this:

http://groups.google.com/groups?thre...%40tkmsftngp10

The last post in the thread contained this:

This code takes 4 seconds to get last 10 lines out of 221,000 Lines regdmp
File.



john wrote:

Hi there,

I am interested in finding out how to read the last 10 lines (or so) of a
text file using the FileSystemObject function, rather than looping through a
text file line-by-line until the end is reached then working backwards.

I may be looking at reading the last 10 lines of a large text file almost
every second, and would be interested in the fastest method available.

If anyone can explain how this could be done, I'd be very grateful!

Thank you.


--

Dave Peterson