Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drive list
Message
 
To
01/11/2000 15:57:01
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00436880
Message ID:
00436897
Views:
21
>How do I get a list of the available drives on a given machine?
>
>Thanks,
Elyse,

There are a couple of other ways:
* API Call
DECLARE INTEGER GetLogicalDrives IN Win32API
lndrives = GetLogicalDrives()
FOR lni = 0 TO 25
  IF BITTEST(lndrives, lni)
    lncount = lncount + 1
    DIMENSION a_drives[lncount]
    a_drives[lncount] = CHR(65 + lni)
  ENDIF
NEXT
* Using the Windows Script Host
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
FOR EACH oDrive IN oFSO.Drives
  ? oDrive.DriveLetter
NEXT
In the case of the latter, you can find out about the WSH at the VFUG site (www.vfug.org) in their newsletters beginning with last September's issue. Ed Rauh and I are writing a series on it that is appearing there.
George

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

Click here to load this message in the networking platform