#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Copy file names

How can I copy the file names, within a folder, to another excel spreadsheet?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default Copy file names

This little macro will list all the files in the folder that holds the
file that has this macro in it. Change the folder as necessary. HTH Otto
Sub GetFileList()
Dim ThePath As String
ThePath = ThisWorkbook.Path
fname = Dir(ThePath & "\*.xls")
i = 1
Do While fname < ""
Range("A" & i) = fname
fname = Dir()
i = i + 1
Loop
End Sub

"americana" wrote in message
...
How can I copy the file names, within a folder, to another excel
spreadsheet?



Reply
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
copy of formula contains file names into other cells Turk Excel Worksheet Functions 2 March 6th 07 01:14 AM
how can I copy file names into cells SAM SEBAIHI Excel Discussion (Misc queries) 5 January 20th 07 06:55 PM
Any way to copy file names in windows explorer & paste into Excel? Jason Excel Discussion (Misc queries) 3 January 15th 07 09:14 PM
copy file names covi2k2 Excel Discussion (Misc queries) 3 November 17th 05 02:19 PM
need to copy a long list of file names gilcola Excel Discussion (Misc queries) 6 August 19th 05 12:55 AM


All times are GMT +1. The time now is 10:46 PM.

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"