hier der Code:
Declaration:
Declare Function SearchTree Lib "imagehlp.dll" Alias "SearchTreeForFile" (Byval lpRootPath As String, Byval lpInputPathName As String, Byval lpOutputPathBuffer As String) As Long
Click:
Dim Path As String, RetVal As Long
Dim lpRootPath As String, lpInputPathName As String
lpRootPath = "Pfad"
lpInputPathName = "Datei"
Path = Space(512)
RetVal = SearchTree(lpRootPath, lpInputPathName, Path)
If RetVal <> 0 Then
Msgbox Path
Else
Msgbox "File not found"
End If
Hier wird nur die erste Datei gefunden :-(