hello salman
use this code
write the path and write the filename
'''''''''''''''''''
Private Sub Form_Load()
ShowFileList ("C:\")
Form1.Hide
End Sub
Function ShowFileList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 In fc
If InStr(1, LCase(f1.Name), "filename") = 1 Then
s = s & f1.Name
s = s & nbsp
End If
Next
MsgBox (s)
End Function
surendran
|