View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
#DIV/0 #DIV/0 is offline
external usenet poster
 
Posts: 30
Default listing file attributes

There are lots of posts about listing the contents of a folder and I've got
that.
But I'd like some of the file attributes too (Title, Subject, Comments etc)
and I haven't found a clear posting about that. The opinion seems to be that
you should use FileSystemObject scripting but that's all new territory for me.
I found this:
Set fso = CreateObject("Scripting.FileSystemObject")
Set Folder = fso.GetFolder("C:\DRIVERS")
i = 1
For Each file In Folder.Files
Sheets(1).Cells(i, 1) = file.Name
i = i + 1
Next
which works and a list of the file properties that should be available (0 =
name, 1 = size, 10 = Title etc.) but I don't know how to combine the two
snippets of info.

Can anyone help?

--
David M
WinXP - Office2003 (Italian)