Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default List FullFilePath and File name

Folks,

There seems to be a number of people that have varuis scripts to list
filename with full path here. Hovever, it seems that this one is one
of tha fastest i have tried so far. The only problem is that i need
this to also include all "SubFolders" not just one folder.

How can that be done ?




Sub ListFiles02()
'Using FileSearch to list the files in a directory
Dim i As Integer
i = 1
With Application.FileSearch
..NewSearch
..LookIn = "C:\GTA\Loaded Drawings\"
..Filename = "*.*"
.SearchSubFolders = True
'.SearchFolders = False
..Execute
For i = 1 To .FoundFiles.Count
Range("B" & i + 1).Value = .FoundFiles(i)
Range("C" & i + 1).Value = FileDateTime(.FoundFiles(i))
'Range("D" & i+1).Value = FileLen(.FoundFiles(i))
Next


End With


End Sub

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



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