Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get full subdirectory list w/o looping
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00402868
Message ID:
00402900
Vues:
13
>>>Is there an API function I can use to get a full subdirectory tree, instead of having to loop through ADIR(lax,"","D") calls?
>>
>>Not without having to make repeated calls to something like FindFirstFile()/FindNext(). In which case you're going to be doing an iteration anyway, plus incurring a boatload of code overhead to maintain in order to extract the information from a WIN32_FIND_DATA data structure. The only other alternative would be the WSH's FileSystemObject and iterating through the folders collection. Then you're doing the thing you apparently don't want to do (plus its slower).
>
>That's what I was afraid of :(
>Where can I find documentation on the WSH?

A ton of places (including links in Ed Rauh's sig block). The MSDN library has two that are of interest WSH.chm and VBScrip5.chm. All the examples are in VBScript, so if you're not familar with it, it's a good idea to go over the tutorial in the VBScrip5.chm file. Another good reference is Dino Esposito's "Windows Script Host Programmers Reference" from Wrox Press.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform