Dim Fso As Object Set Fso = CreateObject("Scripting.FileSystemObject") MsgBox Fso.GetFolder("c:\carpeta").Files.Count Set Fso = Nothing