S
Snoopy
Hey guys
My macro generates a file-name list with accordingly attributes as
"size", "Accessed date".
My problem is to expand this Explorer-information with attributes:
"Author" and "Owner".
I dont know/cantv find the code...... maybe file.author or
something????+
Here is my macro:
Sub SelectFiles(ByVal sPath)
'-----------------------------------------------------------------------
Dim fldr As Object
Dim Folder As Object
Dim file As Object
Dim Files As Object
Set Folder = FSO.GetFolder(sPath)
Set Files = Folder.Files
For Each file In Files
If (file.Attributes And 2 Or _
file.Attributes And 4) Then
'
Else
If InStr(1, file.Name, res, vbTextCompare) > 0 Then
cnt = cnt + 1
ReDim Preserve arFiles(3, cnt)
arFiles(0, cnt) = Folder.path
arFiles(1, cnt) = file.Name
arFiles(2, cnt) = Format(file.DateLastAccessed,
"yyyy.mm.dd hh:mm")
arFiles(3, cnt) = file.Size
End If
End If
Next file
level = level + 1
For Each fldr In Folder.Subfolders
SelectFiles fldr.path
Next
End Sub
I would realy appreciate your guidance here
Regards
Snoopy
My macro generates a file-name list with accordingly attributes as
"size", "Accessed date".
My problem is to expand this Explorer-information with attributes:
"Author" and "Owner".
I dont know/cantv find the code...... maybe file.author or
something????+
Here is my macro:
Sub SelectFiles(ByVal sPath)
'-----------------------------------------------------------------------
Dim fldr As Object
Dim Folder As Object
Dim file As Object
Dim Files As Object
Set Folder = FSO.GetFolder(sPath)
Set Files = Folder.Files
For Each file In Files
If (file.Attributes And 2 Or _
file.Attributes And 4) Then
'
Else
If InStr(1, file.Name, res, vbTextCompare) > 0 Then
cnt = cnt + 1
ReDim Preserve arFiles(3, cnt)
arFiles(0, cnt) = Folder.path
arFiles(1, cnt) = file.Name
arFiles(2, cnt) = Format(file.DateLastAccessed,
"yyyy.mm.dd hh:mm")
arFiles(3, cnt) = file.Size
End If
End If
Next file
level = level + 1
For Each fldr In Folder.Subfolders
SelectFiles fldr.path
Next
End Sub
I would realy appreciate your guidance here
Regards
Snoopy