> I need to get the number of lines/records in a text file > Using this: > while not Eof(F) do begin > ReadLn(F); > Inc(iRows); > end; It might depend on what you are doing with the information. Sometimes it works as well to just estimate from file size (eg setting up a progress bar for say ascii import). If you REALLY want to know then agree with the memory mapped file. ---------------------------------------------------------- Phil Scadden, Institute of Geological and Nuclear Sciences 41 Bell Rd South, PO Box 30368, Lower Hutt, New Zealand Ph +64 4 5704821, fax +64 4 5704603 --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
- RE: [DUG]: Number of lines in text file Max Nilson
- RE: [DUG]: Number of lines in text f... Sergei Stenkov
- Re: [DUG]: Number of lines in text f... Neven MacEwan
- [DUG]: IDE behaviour Rohit Gupta
- [DUG]: TTreeView Rohit Gupta
- Re: [DUG]: TTreeView Steve Peacocke
- [DUG]: Calculated Fields Rohit Gupta
- RE: [DUG]: Number of lines in text file Sergei Stenkov
- Re: [DUG]: Number of lines in text file Neven MacEwan
- RE: [DUG]: Number of lines in text file Sergei Stenkov
- RE: [DUG]: Number of lines in text file Phil Scadden
- RE: [DUG]: Number of lines in text file Andrew Dibley
- RE: [DUG]: Number of lines in text file Sergei Stenkov
- Re: [DUG]: Number of lines in text file David Brennan
- [DUG]: Array - deleting an element Damien Long
- RE: [DUG]: Number of lines in text file Andrew Dibley
- RE: [DUG]: Number of lines in text file Sergei Stenkov
- RE: [DUG]: Number of lines in text file Steve Peacocke
- RE: [DUG]: Number of lines in text file Sergei Stenkov
- RE: [DUG]: Number of lines in text file Steve Peacocke