Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dir of a drive
Message
 
To
10/09/2003 18:06:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00828015
Message ID:
00828114
Views:
18
>Help !! I want to make a data file of all the folder names on c: drive or d: drive. I have tried adir(), dir etc and can not get the folder names, I can get the file names in the folder which I don't need. Any help will be appreciated.

The problem with ADIR() is that including the 'D' in the attributes parameter is inclusive rather than exclusive. IOW, not only do you get the folders, but the files as well, unless you change the default directory to the root of the drive and pass an empty string as the parameter.

Easier, IMO, is to you the Windows Script Host's FileSystemObject.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform