Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All.
I have this below coding to list all files in a directory. However i need to modify the code to modify the code to display the folder path along with the file name. If possible as well, i need to modify the coding to also list files located in sub-directories as well. Any help would be greatly appreciated. Cheers. Skmr3. Sub DisplayFilesInDirectory() Dim fs, f, f1, fc, s Dim Folder Folder = "???" Set fs = CreateObject("scripting.filesystemobject") Set f = fs.GetFolder(Folder) Set fc = f.Files For Each f1 In fc ActiveCell.Value = s & f1.Name ActiveCell.Offset(1, 0).Activate Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop Excel from locking files/directories you AREN'T working on? | Excel Discussion (Misc queries) | |||
Listing of excel files in My Documents | Excel Discussion (Misc queries) | |||
LIsting Files in Excel | Excel Discussion (Misc queries) | |||
Periodically listing files in a folder | Excel Discussion (Misc queries) | |||
How do I get excel files to open automatically from directories? | Excel Discussion (Misc queries) |