Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR optimization
Message
De
12/08/2001 22:42:47
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00542818
Message ID:
00542851
Vues:
19
>>>>>>I am using ADIR to get a specific number of files from a directory based on a criteria. So, ADIR(laFile,gcFat+'thread\*.*') will create an array and I can now use ALEN(laFile,1) to get the file count. However, on big directory this is causing a big array to be created just to get the number of files. How can I optimize that?
>>>>>
>>>>>lnFiles=adir(laFile,gcFat+'thread\*.*'), e.g. adir returns number of files.
>>>>>
>>>>>Too bad, you don't have Help installed...
>>>>
>>>>Yes, based on that code, it could be optimized this way. However, the problem is with the creation of the array. I'll try Larry's suggestion.
>>>
>>>You may try this Forum: Visual FoxPro Category: Coding, syntax & commands Title: Re: ADIR optimization Thread #542818 Message #542840
>>>solution as well and compare, what's faster...
>>
>>GetFolder() doesn't seem to accept a scope.
>
>What do you mean? Do you want number of all files or only specific extension files? If later, than "Yes", it doesn't allow to specify file extension :(

Basically, I need to scope on all *.jpg. Anyone to accomplish that with that object?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform