Vérifiez la Scripting.FileSystemObject.
Dans votre projet, ajoutez une référence à "Microsoft Scripting Runtime".
Ensuite, vous pouvez faire quelque chose comme ceci:
Dim fso As Scripting.FileSystemObject
Set fso = New Scripting.FileSystemObject
Dim fld As Scripting.Folder
Set fld = fso.GetFolder("d:\temp\newfolder")
Dim i As Integer
Dim ext As String
Dim fl As Scripting.File
For Each fl In fld.files
'get extension
ext = Mid(fl.Name, Len(fl.Name) - 2)
If ext = "txt" Or ext = "fin" Then
'do something with the file
End If
Next fl
Ceci est l'un des domaines qui a obtenu tellement mieux avec .NET.
en double de cette question http://stackoverflow.com/questions/729636/any-function-for-listing-out-all-the-files-of-a -specified-type-dans-un-dossier-en-vb6 – MarkJ