#1   Report Post  
Ray A
 
Posts: n/a
Default 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   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

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   Report Post  
Posted to microsoft.public.excel.misc
ALLM
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default 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
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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Can't Copy and Paste between Excel 2003 Workbooks wllee Excel Discussion (Misc queries) 6 March 30th 05 02:59 PM
Copy and Paste and keep format the same Brian Caraher Excel Discussion (Misc queries) 1 March 17th 05 02:05 PM
Copy & Paste Brian Keanie Excel Discussion (Misc queries) 1 February 5th 05 11:56 AM
copy paste cell character limit Fred Excel Discussion (Misc queries) 1 December 2nd 04 08:58 PM


All times are GMT +1. The time now is 10:31 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"