Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subdirectory listings
Message
De
23/10/2000 08:33:26
Peter Garneau
Statistics Canada
Ontario, Canada
 
 
À
22/10/2000 23:18:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00432711
Message ID:
00432795
Vues:
30
Thanks a million.

>>I am trying to find a way to programatically identify all the subdirectories in a directory. For example, given the directory c:\my documents, I would like to be able create an array of all it's subdirectories.
>>
>
>The Scripting.FileSystemObject can create a collection of subfolders of a given folder.
>
>
oFSO=CREATEOBJ('Scripting.FileSystemObject')
>oFolder = oFSO.GetFolder('c:\my documents')
>FOR EACH oSubFolder IN oFolder.SubFolders
>   ? oSubFolder.Path
>ENDFOR
>
>You can do a similar type of operation using ADIR() writing a bit more code. You can work out the details for yourself of populating an array if you need it. Dave Frankenbach and I have posted several threads about the recursing of a directory tree in the past; you can dig them out if you like.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform