Results 1 to 2 of 2

Thread: Large text log file management

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    15

    Question Large text log file management

    I have a large (>50,000 lines) text log file that I would like to "copy" the last n lines from, into another, new text file.

    I would rather not read the whole log file into an array simply to save the last n lines out to a new file, it seems very processor intensive for that result.

    Can anyone think of a way I can get the last n lines from a text file this large?

    Many thanks

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Umm , have a look at StreamReader(or FileStream) class . I think I've seen one of the overloaded function that can read from specific position .

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