Copy the "Title" Field from windows explorer to excel?

  • Thread starter Thread starter andrew.ewing
  • Start date Start date
A

andrew.ewing

Im trying to copy the "title" field along with the "filename" into
excel. Im able to copy the filename field via a batch file using the
Dir command, but it doesnt allow you to copy the other fields that are
in the explorer window. Is there a a way to do this?

Thanks in advance
 
I tend to use the Scripting FileSystemObject to get this sort of
info. In VBA, go to the Tools menu, choose References, and select
"Microsoft Scripting Runtime". Then, use code like

Dim FSO As Scripting.FileSystemObject
Dim F As Scripting.File
Set FSO = New Scripting.FileSystemObject
Set F = FSO.GetFile("H:\Test.txt")
Debug.Print F.Path
Debug.Print F.Name
Debug.Print F.Size
' other attributes of F

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top