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 many types of recording modes in qtp?
Is it possible to merge two object repository files in qtp?
If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP
I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.
Discuss quicktest professional environment?
What is the file extension of the code file and object repository file in QTP?
What are the different kinds of test steps?
What is object spy in quicktest professional?
What are the Disadvantages of shared object repository?
how can i pass a "cript"as a parameter in to a function
Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..
What is meant by a Check Point in UFT? Also, explain the applicable Check Points.
how do u plan test automation?
i'm testing the webpage with QTP, in this wabpage i have to choose the CV from the window, but QTP can't recognize the object, so i used the Low LEvel Recording, but every time i run the test, QTP go to halt when it gets to the Recorded part, any solution for that?( except puting delay in the script and manuall selecting, because i've did that)
give me an example where u used good judgement and logic in solving a problem