Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of Drives?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00508662
Message ID:
00508664
Views:
23
This message has been marked as the solution to the initial question of the thread.
>Is there any way, either in VFP 6 or VFP 7, to get a list of all drives that are available?

Chaim,

There are a couple of ways to do this. Simplest is probably
FOR lni = 65 TO 90
  lcdrive = CHR(lni)
  IF DRIVETYPE(lcdrive) # 1
    ? lcdrive
  ENDIF
NEXT
The there's the Windows Script Host
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
FOR EACH oDrive IN oFSO.Drives
  ? oDrive.DriveLetter
NEXT
George

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

Click here to load this message in the networking platform