RecurseFolderList
This code is a modified version of ShowFolderList by Bruce Lindsay. (Thanx !!) This code will recursively parse a directory defined by an path parameter. My aim was to work around the non-recursive nature of the dir function. Bruce's original code does that to one folder/child level. Mine now returns everything below a given path. You can still use getattr to define Folder or File attributes.
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
Function RecurseFolderList(foldername)
Dim fso, f, fc, fj, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(foldername)
Set fc = f.Subfolders
Set fj = f.Files
'For each subfolder in the Folder
For Each f1 In fc
'Do something with the Folder Name
debug.print f1
'Then recurse this function with the sub-folder to get any sub-folders
RecurseFolderList(f1)
Next
'For each folder check for any files
For Each f1 In fj
debug.print f1
Next
End Function
Upload
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine