Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low level file functions to get the number of lines
Message
From
22/07/1997 18:57:09
 
 
To
22/07/1997 18:41:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00041205
Message ID:
00041239
Views:
39
I just realized you don't need to have a limit for your files. So:

lnFileHandle = fopen( lcFileName)
lnFileSize = fseek( lnFileHandle, 0, 2)
fseek( lnFileHandle, 0)
lcText = fread( lnFileHandle, lnFileSize)
lnLines = occurs( chr(13), lcText)

This is VERY fast even with big files. Please note that you can use lcText to append to your dbf (using mline() function).

Vlad

>>I asked how big it "can" be, not "is". I mean: 10 bytes, 1000 bytes, 100000 bytes,...?
>
>Same answer, it can be 100 bytes and up until 1000000 bytes.
Previous
Reply
Map
View

Click here to load this message in the networking platform