lcFile='J:\phone\phone1100.txt' && 382MB file *!* lnSec=seconds() *!* create cursor dummy (f1 l) && Smallest possible to speed up *!* append from (lcFile) type sdf *!* nLines = reccount() *!* use in 'dummy' *!* ?seconds()-lnSec, nLines set escape on on escape halt=.t. lnSec=seconds() local lnHandle, lnCount, m.halt m.halt=.f. *----------------------------------------- *-- Get a file handle *----------------------------------------- lnHandle = fopen(lcFile,12) ?lnHandle *----------------------------------------- *-- Move to the first line *----------------------------------------- =FSEEK(lnHandle, 0, 0) *----------------------------------------- *-- Loop through each line and count *----------------------------------------- lnCount = 0 do while !feof(lnHandle) and !m.halt if m.halt exit endif lnCount = lnCount + 1 =fgets(lnHandle) enddo ?seconds()-lnSec, lnCount