"One of the great things about FoxPro," a wise man (or was it a wise
guy?) said, a couple of decades ago, "is that there's three ways to do
anything in FoxPro. Or no way at all."

This thread is a great illustration of this. Every three days, someone
else drifts through the forum and suggests MEMLINES(), MLINE(),
ALINES(), LLFFs, FileToStr(), the OS's FileSystemObject, APPEND,
APPEND TO MEMO, file size limits (16Mb or 2Gb, depending on which),
shelling out to PowerShell (1), using the Linux wc (wordcount) ported
to Windows or using the new Linux under Windows, using Office
Automation to import the file to Excel (or Word!) and querying the
number of lines, or some other solution.

There's some elegant solutions in Perl or Python, too, if you happen
to have them installed.

(1) 
https://blogs.technet.microsoft.com/heyscriptingguy/2011/10/09/use-a-powershell-cmdlet-to-count-files-words-and-lines/


On Fri, Apr 28, 2017 at 6:22 AM, Laurie Alvey <trukke...@gmail.com> wrote:
> Have you thought about the ALINES() function?
>
> Laurie
>
> On 27 April 2017 at 16:12, Fernando D. Bozzo <fdbo...@gmail.com> wrote:
>
>> Hi Mike:
>>
>> A very fast method is using the FileSystemObject:
>>
>> loFSO = CREATEOBJECT("Scripting.FileSystemObject")
>> loFile1 = loFSO.OpenTextFile(lcArchivo1, 1)
>>
>> Look at the syntax on Microsoft web site for the read method.
>> It does not have the limitation of VFP's fread/fgets
>>
>> Regards
>>
>> El 21/4/2017 4:45 p. m., <mbsoftwaresoluti...@mbsoftwaresolutions.com>
>> escribió:
>>
>> > VF9SP2
>> >
>> > Currently, I'm simply doing this for now:
>> >
>> > RowCount = OCCURS(CHR(13),FILETOSTR(m.Filename))
>> >
>> > Is there a better (read: FASTER) way?  These are tab delimited text files
>> > so I can't really use FSEEK or FSIZE(m.Filename) (which requires SET
>> > COMPATIBLE ON) because I can't be sure of each record's length.
>> >
>> > tia,
>> > --Mike
>> >
>> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4s9k5YnOnZJk0o0r_rpSSGi+dLdRBBKUa88g8xZz6=o...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to