5:50 AM -
Advanced QTP,QTP,VB Script
No comments
How to get Sub-folders Count and Names from a Folder?
Set Obj = CreateObject("Scripting.FileSystemObject")'Creating a file system object
Set Obj1 = Obj.GetFolder("C:\test")
Set Obj2 = Obj1.SubFolders
msgbox Obj2.Count 'displaying count of sub-folders
For Each Fold_Iteam in Obj2
Fold_names = Fold_names& Fold_Iteam.name &vbnewline
Next
msgbox Fold_names 'Displaying all sub-folders names
0 comments:
Post a Comment