Private Sub test()
Cells.Delete
Set fso = CreateObject("Scripting.FileSystemObject")
With fso.GetFolder("......................") 'Liste les fichiers du répertoire
[A1].Resize(, 4) = Array("Nom", "Octets", "K Octets", "M Octets")
[A1].Offset(1).Select
On Error Resume Next
For Each File In .Files
Selection = File.Name 'Place leurs noms ds le document
Selection.Offset(, 1) = File.Size
Selection.Offset(, 2) = Application.WorksheetFunction.Round(File.Size / 1024, 0)
Selection.Offset(, 3) = Application.WorksheetFunction.Round(File.Size / 1024 ^ 2, 2)
ActiveCell.Offset(1).Select
Next
End With
Set fso = Nothing
Columns.AutoFit
End Sub