Assume there is a folder named 'abc' in C drive and we need to get the count of all the files with in the folder
Dim objFso
Set objFso=CreateObject("Scripting.FileSystemObject")
Set Folder=objFso.GetFolder("C:/abc")
Set NoOfFiles=Folder.Files
Msgbox NoOfFiles.count
Set objFso=Nothing
Dim objFso
Set objFso=CreateObject("Scripting.FileSystemObject")
Set Folder=objFso.GetFolder("C:/abc")
Set NoOfFiles=Folder.Files
Msgbox NoOfFiles.count
Set objFso=Nothing
No comments:
Post a Comment