>>>create cursor Dummy (TxtFld C (250)) >>>append from TextFile SDF >>>nLines = Reccount() >>>>>
>>Thanks !! >>Very clever! >>>
>LOCAL lnHandle, lnCount > >*----------------------------------------- >*-- Get a file handle >*----------------------------------------- >lnhandle = FOPEN("myFile.txt") > >*----------------------------------------- >*-- Move to the first line >*----------------------------------------- >=FSEEK(lnhandle, 0, 0) > >*----------------------------------------- >*-- Loop through each line and count >*----------------------------------------- >lnCount = 0 > >DO WHILE !FEOF() > lnCount = lnCount + 1 > =FREAD(lnHandle) >ENDDO > >RETURN lnCountYes, I was going to suggest it too. Besides, this is the only way for really big files (more than 16MB).