07-15-2009, 05:47 PM
Hi Arijith,
For this type of requirements only we do have FSO(File system object).
Go thru the help file for FSO & implement accordingly.
Anyhow i am giving you the below solution.
For this type of requirements only we do have FSO(File system object).
Go thru the help file for FSO & implement accordingly.
Anyhow i am giving you the below solution.
Code:
Set objFileSysOb = CreateObject("Scripting.FileSystemObject")
Set colFolderName = objFileSysOb.GetFolder("give entire folder path here")
Set vFiles =colFolderName.Files
Sno=0
For each i in vFiles
d=Split(i,"\")
FileName=d(ubound(d))
Sno=Sno+1
msgbox "File "&Sno&" : "&FileName
Next
msgbox "Number of files in Current Folder : "&vFiles.count