Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching entire tree or multiple drives for files of ty
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00269901
Message ID:
00269920
Vues:
19
>I am trying to come up with a single command or algorythm in Visual FoxPro 6.0 to scall all available drives, including sub-folders for files of type, and storing the resulting file list into an array, or a table. This will give me fast access to all files of type, when needed by the main apllication.
>
>Anyone have any ideas?

Much of what you want can also be supplied through the Scripting.FileSystemObject. For example, the following returns the drives used:
oFS = CREATEOBJECT('Scripting.FileSystemObject')
fsoDrives = oFS.Drives
FOR EACH oDrive IN fsoDrives
  ? oDrive.DriveLetter
ENDFOR
The API functions GetLogicalDrives() and GetLogicalDriveStrings() can also be used. The scripting object also has a Folders and Files collection. You can get further information at the MSDN site.
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