Home |
Search |
Today's Posts |
#1
|
|||
|
|||
copy & paste
I would like to copy all the file names from a folder in explorer into Excel.
Is this possible? I am using Window XP and Excel 2003 |
#2
|
|||
|
|||
Ray,
Dim i As Integer With Application.FileSearch .NewSearch .LookIn = "C:\Documents and Settings" .FileType = msoFileTypeAllFiles .SearchSubFolders = False If .Execute 0 Then For i = 1 To .FoundFiles.Count Range("A" & i).Value = .FoundFiles(i) Next i End If End With HTH, Bernie MS Excel MVP "Ray A" <Ray wrote in message ... I would like to copy all the file names from a folder in explorer into Excel. Is this possible? I am using Window XP and Excel 2003 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
copy & paste
This is good info but I am not a programmer. Is there an alternative way to
do this. If not in Exel something else maybe? Al "Bernie Deitrick" wrote: Ray, Dim i As Integer With Application.FileSearch .NewSearch .LookIn = "C:\Documents and Settings" .FileType = msoFileTypeAllFiles .SearchSubFolders = False If .Execute 0 Then For i = 1 To .FoundFiles.Count Range("A" & i).Value = .FoundFiles(i) Next i End If End With HTH, Bernie MS Excel MVP "Ray A" <Ray wrote in message ... I would like to copy all the file names from a folder in explorer into Excel. Is this possible? I am using Window XP and Excel 2003 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
copy & paste
One method: click Start, Run and type CMD (to run a DOS window) type CD\MyFolder using the path to your folder something like CD\Documents and Settings\MyFiles type DIR /-b /w ListFiles.txt to copy a list of filenames to a file type Exit to close this window This file (ListFiles.txt) can be opened into Excel. Hope this helps -- Ray A Wrote: I would like to copy all the file names from a folder in explorer into Excel. Is this possible? I am using Window XP and Excel 2003 -- Bryan Hessey ------------------------------------------------------------------------ Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059 View this thread: http://www.excelforum.com/showthread...hreadid=377755 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Can't Copy and Paste between Excel 2003 Workbooks | Excel Discussion (Misc queries) | |||
Copy and Paste and keep format the same | Excel Discussion (Misc queries) | |||
Copy & Paste | Excel Discussion (Misc queries) | |||
copy paste cell character limit | Excel Discussion (Misc queries) |