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
Have you done batch testing in qtp? If yes how you are doing?
How will you compare keyword and expert view?
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
What is recovery scenario manager? When you go for recovery scenario manager?
Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?
What is an object repository?
How to delete an object from the object repository?
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
Can we record an application running on a remote machine using qtp?
What is standalone database?
How do you check ticket cost and ticket number in flight application?
What is a recovery scenario?
Have you used xml check point in your project? How?
Explain advantages and disadvantages of ddf?
Explain the concept of object repository and how QTP recognizes objects?