Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get full subdirectory list w/o looping
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00402868
Message ID:
00402900
Views:
11
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform