Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listing all available drives both local and networked
Message
From
21/09/2000 10:10:30
 
 
To
21/09/2000 09:50:37
Rene Van Den Berg
Infertility Database Systems Ltd
Islington, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00418998
Message ID:
00419018
Views:
26
>How can i list all the drives wherther local or networked mapped drives. Do i need to use an API function ?? help,please !!

Depending on what's available to you, you can use calls to the Win32API, or simply use the Scripting.FileSystemObject from WSH and access it's Drives collection, which will provide a tremendous amount of information by traversal of the Drives collection:
oFSO = CREATEOBJ('Scripting.FileSystemObject')
FOR EACH Drive in oFSO.Drives
   ? Drive.DriveLetter,Drive.AvailableSpace,Drive.DriveType
ENDFOR
See the WSH docs in the MSDN, or through th WSH-related sites in my sig block.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform