Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Directory & Subdirectory Info.
Message
 
 
To
05/07/2002 20:01:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00675780
Message ID:
00675789
Views:
15
You can use Windows Script Host (WSH).
oFso = CREATEOBJECT('Scripting.FileSystemObject')
For each oDrv in oFso.Drives
  ? oDrv.DriveLetter 
Endfor
The following message show how to traverse directory tree: A Friday Tip Message #633428



>Hi,
>
>How can I read the directory and subdirectory information on a hard drive, including its partitions/volumes.
>
>I am creating a program that is to scan the hard drive and any partitions for MP3 files. I would like to know how I can search through the directory tree and its numerous subdirectories, regardless of how many directories and subdirectories are on the drive.
>
>I am using gnDir = ADIR(gaDir, "", "D") to get the directory info., but I am having trouble with reading the subdirectories. The problem is knowing how deep the subdirectory system is.
>
>I see infinite loops doing it my way. I belive there has to be an easier way.
>
>Also, can I get some help as to how to determine how many drives/partitions are on the drive?
>
>Thank you,
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform