Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a macro out there that will list all the names of files in a folder
I specify? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dominique
One way Run this with a empty sheet active Sub test2() Dim i As Long With Application.FileSearch .NewSearch .LookIn = "c:\Data" .SearchSubFolders = False .MatchTextExactly = False .FileType = msoFileTypeAllFiles If .Execute(msoSortOrderDescending) 0 Then MsgBox "There were " & .FoundFiles.Count & " file(s) found." For i = 1 To .FoundFiles.Count Cells(i, 1).Value = .FoundFiles(i) Cells(i, 2).Value = FileDateTime(.FoundFiles(i)) Cells(i, 3).Value = FileLen(.FoundFiles(i)) Next i Else MsgBox "There were no files found." End If End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Dominique Feteau" wrote in message ... Is there a macro out there that will list all the names of files in a folder I specify? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dominique,
Or my "List Files" Excel add-in will do that. It finds files with the extension you specify, such as *.xls, in the folder you specify and returns a list on a new worksheet. Each file is hyperlinked and gives the file name, path, size and date last modified. It can be sorted. Comes with a one page install/use Word.doc. Available free upon direct request. Remove xxx from my email address. Regards, Jim Cone San Francisco, CA XX "Dominique Feteau" wrote in message ... Is there a macro out there that will list all the names of files in a folder I specify? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
List of Files in A Directory | Excel Discussion (Misc queries) | |||
list directory in EXCEL | Excel Discussion (Misc queries) | |||
List of folders in a certain directory | Excel Discussion (Misc queries) | |||
lIST dIRECTORY | Excel Programming | |||
list box- list all files ina directory | Excel Programming |