View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Deeds Deeds is offline
external usenet poster
 
Posts: 113
Default Copy Filenames AND details to Excel

Below is some code that I use to get display the filenames from directories
into excel. However, it only brings in the filename...how can I also get the
details portion of it...namely the modified date? Any ideas.
Thanks in advance


Sub AllFilenames()
Rem Change D:\ to your folder path
D = "C:\MY FILES\"
Cells(1, 1) = "Filenames"
r = 2
f = Dir(D, 7)
Do While f < ""
Cells(r, 1) = f
r = r + 1
f = Dir
Loop
End Sub