Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List of Drives?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00508662
Message ID:
00508664
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform