Something along the lines of...

var
  lStream: TFileStream;

begin
  lStream := TFileStream.Create('The Filename', fmOpenRead);
  try
    if lStream.Size > 1024 then
    begin
      lStream.Seek(-1024, foFromEnd);
      < do what ever here >
    end;
  finally
    lstream.free;
end;

JED

                                                                  
 (Embedded                                                        
 image moved   [EMAIL PROTECTED]                         
 to file:      30/06/2000 12:48                                   
 pic01169.pcx)                                                    
                                                                  



Please respond to [EMAIL PROTECTED]

To:   Multiple recipients of list delphi <[EMAIL PROTECTED]>
cc:
Subject:  [DUG]: Question


Let's say I need to see the last 1024 characters in a text file. Would I
use
a file stream to access it? How?

============================================
Patrick Dunford, Christchurch, NZ
EnzedRailWeb Sites
http://www.trainweb.org/enzedrail/web/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Paintbrush

Reply via email to