Sub test()
'adaptée de:
'http://www.developpez.net/forums/showthread.php?t=342976
Dim Chemin As String
Dim i As Integer
Dim objFSO As Object, objFile As Object
Chemin = "C:\Temp"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Application.ScreenUpdating = False
With Application.FileSearch
.NewSearch
.FileType = msoFileTypeOfficeFiles
.LookIn = Chemin
.SearchSubFolders = True
.Execute
Cells(1, 1).Value = "N°"
Cells(1, 2).Value = "Nom Dossier"
Cells(1, 3).Value = "Nom fichier"
Range("A1:C1").Font.Bold = True
With .FoundFiles
For i = 1 To .Count
Cells(i + 1, 1) = i
Worksheets(1).Hyperlinks.Add Cells(i + 1, 3), .Item(i)
Cells(i + 1, 3).Hyperlinks(1).TextToDisplay = Dir(.Item(i))
Set objFile = objFSO.GetFile(.Item(i))
Cells(i + 1, 2) = Dir(objFSO.GetParentFolderName(objFile), vbDirectory)
Next i
End With
End With
Columns("C:E").AutoFit
Application.ScreenUpdating = False
End Sub