jackeroo75
Technical User
This code works but I want to also check all sub folders in C and get the owmer information from the file.
Sub Test()
Dim Sh As Object
Dim ShFolder As Object
Dim ShFile As Object
Set Sh = CreateObject("Shell.Application")
Set ShFolder = Sh.Namespace("C:\") 'CHANGE FOLDER PATH
For Each ShFile In ShFolder.Items
Debug.Print ShFile.Path, ShFile.Name, ShFolder.GetDetailsOf(ShFile, 10) ‘this gets owner
Next
End Sub
Sub Test()
Dim Sh As Object
Dim ShFolder As Object
Dim ShFile As Object
Set Sh = CreateObject("Shell.Application")
Set ShFolder = Sh.Namespace("C:\") 'CHANGE FOLDER PATH
For Each ShFile In ShFolder.Items
Debug.Print ShFile.Path, ShFile.Name, ShFolder.GetDetailsOf(ShFile, 10) ‘this gets owner
Next
End Sub