Hi,
I have the following that places all file names in a folder into a sheet, however I want the folder names within a folder placed into the sheet. Is this possible?
NextRow = 2
With Application.FileSearch
.NewSearch
.LookIn = "W:\Compliance2\2 - Account Approval Process\2 - CORPORATE CLIENTS"
.Filename = "*.*"
.Execute
FileToProcess = .FoundFiles.Count
For i = 1 To .FoundFiles.Count
ThisEntry = .FoundFiles(i)
Cells(NextRow, 1).Value = ThisEntry
NextRow = NextRow + 1
Next i
I have the following that places all file names in a folder into a sheet, however I want the folder names within a folder placed into the sheet. Is this possible?
NextRow = 2
With Application.FileSearch
.NewSearch
.LookIn = "W:\Compliance2\2 - Account Approval Process\2 - CORPORATE CLIENTS"
.Filename = "*.*"
.Execute
FileToProcess = .FoundFiles.Count
For i = 1 To .FoundFiles.Count
ThisEntry = .FoundFiles(i)
Cells(NextRow, 1).Value = ThisEntry
NextRow = NextRow + 1
Next i