LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type details into one cell and they copy into another slavenp Excel Discussion (Misc queries) 2 August 1st 07 09:38 AM
Macro for copy pasting details from main sheet hipul Excel Discussion (Misc queries) 1 June 26th 07 08:59 AM
Copy row details where cell value meets certain criteria Sarah (OGI) Excel Worksheet Functions 2 May 17th 07 05:06 PM
using excel to rename filenames? vmorgan Excel Discussion (Misc queries) 1 March 14th 06 06:12 PM
How do I copy subtotaled data without the underlying details? DBergesen Excel Worksheet Functions 1 December 15th 05 06:25 PM


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"