Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid subscript reference
Message
From
01/12/2006 08:55:09
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
30/11/2006 20:23:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173721
Message ID:
01174058
Views:
12
>>>The following example will put the list of files into the file "output.txt", which must then be analyzed.
>>>
>>>
>>>RUN DIR c:\MyFolder\*.* /B > output.txt
>>>
>>
>>I need the fastest and most reliable method, which would work correctly on a directory with more than 13K files.
>
>Well, then, see how fast it works, and compare it with the other methods.
>
>The part above should work without problems; to read in the file, you can use FileToStr() and alines() (if you expect less than 65,000 files), or FileToStr() and a combination of _mline and mline() (if you expect more than 65,000 files).

I took a piece of code Drew Speedie wrote that used filetostr etc. I found it was much much faster to create a cursor and append from the text file, do replace commands and copy the modified files back to a new text file than to use those functions.
Previous
Reply
Map
View

Click here to load this message in the networking platform