i have .xls,.txt,.doc files are there (together). i want
find only .xls file among them? how can we write function?
Answer Posted / uday kumar_anem
Hi,
Please try with this script:
Set fileSysObj=CreateObject("Scripting.FileSystemObject")
folderPath="D:\"
If fileSysObj.folderexists(folderPath) then
Set fileObj=fileSysObj.getfolder(folderPath)
Set fileObjs=fileObj.files
For Each FileName In fileObjs
If FileName.type="Microsoft Excel Worksheet" then
MsgBox("This is the excel file "&FileName.Name)
End if
next
else
MsgBox("Folder does not exist")
End if
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Output values? i want a practical example
What is Unicode Compatibility?
Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project
Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)
Limitations in QTP?
how to do the batch testing in test director using manual testing procedure?
your coming from electrical backgroung..but y ur coming to software side?
How qtp recognizes the object?
Can we use index on view?
wht type of User defined functions or Java Releated functions do we write in VB scripting
What is the script for database check point, bitmapchek point, regular expression ?
How will you declare a variable in qtp?
Why we load add-ins in qtp?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
What is fragmentation and paging?