View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tony Zappal Tony Zappal is offline
external usenet poster
 
Posts: 21
Default Is a folder list extraction possible?

Sub newfilesearchthing()
Dim LoopCount As Integer
Dim MsgStr As String

With Application.FileSearch
.NewSearch
.LookIn = "D:\"
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
If .Execute() 0 Then
ActiveCell.Value = "There were " & .FoundFiles.Count & _
" file(s) found."
For LoopCount = 1 To .FoundFiles.Count
ActiveCell.Value = .FoundFiles(LoopCount)
ActiveCell.Offset(1, 0).Activate
Next
Else
'MsgStr = "There were no files found."
End If
'MsgBox MsgStr
End With

End Sub


"Brad" wrote:

I would like to archive a list of folders that are on data CDs that we burn
.... Is there a way to do it with excel? I¹ve written a macro to rip out
filenames from a specific folder, but folder names themselves is interesting
problem.

I would also like sub-folders (and sub-sub etc) if possible.

Any ideas or even a small app that does it for you that isn¹t excel??

Thanks a million ..