Collection de tous les objets Folder d'un objet Folder.
Le code suivant illustre la lecture de la collection Folders et son itération à l'aide de l'instruction For Each...Next :
Function ShowFolderList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.SubFolders
For Each f1 in fc
s = s & f1.name
s = s & "<BR>"
Next
ShowFolderList = s
End Function
Count, propriété | Item, propriété
Drive, objet | Drives, collection | File, objet | Files, collection | Folder, objet | SubFolders, propriété