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
What is throw object?
Explain the benefits of quick test pro(qtp)?
When ‘option explicit’ keyword is used in qtp?
Why script error occur in between recording in qtp?
if numbers are always changing write a script for that
What are the two types of repositories available, explain them?
WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,
What is Port testing. Whhen will you perform?
Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points
Does QTP run in any environment?
Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance
What are the different types of checkpoints?
what is keyword driven testing in qtp?n how is it useful?
How the exception handling can be done using quicktest professional?
Shall we add Local Repository to shared object repository,if yes,how we add