Thanks Logit, appreciate the code It doesnt look like there is a reference to getting the extended property information. I already found a code that will list all the files (see below code "Code that lists files" i have also updated my original post with spreadsheet that has this code in my preferred template that lists the information i need) and i found a code that will list all the properties i need (see below code "Code that gets all extended properties") but i am having trouble trying to make them into one as i cant get my head around VBA with object references.
At the end i have but an example of trying to put them together but i'm not using the right reference or something.
Code that lists files
Dim iRow
Sub ListFiles()
iRow = 11
Call ListMyFiles(Range("C7"), Range("C8"))
End Sub
Sub ListMyFiles(mySourcePath, IncludeSubfolders)
Set MyObject = New Scripting.FileSystemObject
Set mySource = MyObject.GetFolder(mySourcePath)
On Error Resume Next
For Each myFile In mySource.Files
iCol = 2
Cells(iRow, iCol).Value = myFile.Path
iCol = iCol + 1
Cells(iRow, iCol).Value = myFile.Name
iCol = iCol + 1
Cells(iRow, iCol).Value = myFile.Size
iCol = iCol + 1
Cells(iRow, iCol).Value = myFile.DateLastModified
iRow = iRow + 1
Next
If IncludeSubfolders Then
For Each mySubFolder In mySource.SubFolders
Call ListMyFiles(mySubFolder.Path, True)
Next
End If
End Sub
Code that gets all extended properties
Sub Get_Extended_File_Property()
Dim sFile As Object, obja
'Create Shell Object & NameSpace
Set oShell = CreateObject("Shell.Application")
Set oDir = oShell.Namespace("D:\F\Fiverr\tixops123 - Excel App")
ActiveSheet.Cells.ClearContents
'Loop thru each File/Folder inside Root Directory
iRow = 1
For Each sFile In oDir.Items
iRow = iRow + 1
'Loop thru Each Property
For i = -1 To 350
'Get File Property Name & Value
obja = oDir.GetDetailsOf(sFile, i)
If obja <> "" Then
iRow = iRow + 1
ActiveSheet.Range("A" & iRow) = i
'Enter File Property to Sheet
ActiveSheet.Range("B" & iRow) = oDir.GetDetailsOf(oDir, i)
ActiveSheet.Range("C" & iRow) = obja
End If
Next
Next
MsgBox "Process Completed"
End Sub
Example of joining code
Dim iRow
Sub ListFiles()
iRow = 11
Call ListMyFiles(Range("C7"), Range("C8"))
End Sub
Sub ListMyFiles(mySourcePath, IncludeSubfolders)
Set oShell = CreateObject("Shell.Application")
Set oDir = oShell.Namespace(mySourcePath)
Set MyObject = New Scripting.FileSystemObject
Set mySource = MyObject.GetFolder(mySourcePath)
On Error Resume Next
For Each myFile In mySource.Files
iCol = 2
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 192)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 0)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 2)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 165)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 1)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 3)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 4)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 12)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 209)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 27)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 316)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 317)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 315)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 320)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 321)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 28)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 319)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 31)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 177)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 179)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 176)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 178)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 175)
iCol = iCol + 1
Cells(iRow, iCol).Value = oDir.GetDetailsOf(myFile, 271)
iRow = iRow + 1
Next
If IncludeSubfolders Then
For Each mySubFolder In mySource.SubFolders
Call ListMyFiles(mySubFolder.Path, True)
Next
End If
End Sub
Really appreciate the time and help. Thanks!