Hi,
this is venkatesh.
Q: I have 10 files in a folder(say D:\). Out of which there
are some .txt, .xls, .doc. I want to know how to get the
count of each file using qtp?
If U have any ans, plz write script for that...
Answer Posted / bathi
set fso=createobject("scripting.filesystemobject")
set objfolder=fso.getfolder("XXX")
set fil=objfolder.files
for each fils in fil
fils1=fils1&fils.name
next
xls=split(fils1,".xls")
msgbox ubound(xls)
doc=split(fils1,".doc")
msgbox ubound(doc)
txt=split(fils1,".txt")
msgbox ubound(txt)
I guess, this will work........
Good Day........
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
how to acess a test in RSA?
Difference between action & Reusable action?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
What are the advantages of a Hybrid framework?
assume i have few url link how will i dynamically call then using descriptive programming?
Can we Test Welcome Screens and Process Images with QTP
Did QTP prove efficient for your project? Yes or No, explain?
What is the file extension of the code file in qtp?
How QTP support all types of applications (platforms)?
Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance
If I change the property value at runtime is it effect is object repository?
How to break the object spy ?
How to handle dynamic objects in quicktest professional?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?