All I can say is ...
1. This recursively goes down all the paths in Col A
For i = LBound(aryPaths) To UBound(aryPaths) Call GetFiles(oFSO.GetFolder(RemovePrefix(aryPaths(i)))) Next
2. If the path is in Col C, then it stops going down that path
If isFolderExcluded(oPath) Then Exit Sub ' stops recursion Call AddFileFolder(oPath)
3. If the file name is in Col E then it does NOT get added to the list
For Each oFile In oPath.Files If Not isFileExcluded(oFile) Then Call AddFileFolder(oFile) Next
4. So I'm not sure how to interpret this
Do you mean that if somewhere in the folder tree here's a file listed in Col E, then delete the entire folder tree?if I wanted the complete path for each specific folder or specific file to be excluded...
Edit:
You can change
toConst incFilesFolders As Long = 10
That tells Redim Preserve how many more spaces to allocate. I had it set low for testing, but might slow things downConst incFilesFolders As Long = 100




Reply With Quote