i have .xls,.txt,.doc files are there (together). i want
find only .xls file among them? how can we write function?
Answer Posted / kamesh
using the extention (.xls) in code..see below code
Here i open the file from mentioned path and read and write
the values on that.
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\DIM.txt", 1, True) ' open to
empty file and also use for open the file which is already
created
WriteLineToFile = f.ReadAll 'Read all the file line to
line
msgbox WriteLineToFile
Set MyFile1 = fso.CreateTextFile
("c:\kamesh.txt",True) 'create new empty file
MyFile1.WriteLine WriteLineToFile ' Write all the stuf
in created file
MyFile1.Close
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
after click on compose mail how can we attached a file in qtp with vbscript code
What are the types of object repositories? Which one is you using?
When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.
how to find that tools work well with your existing system?
What is use of object spy?
Explain different recording modes?
in my application,validation message has in japanise language.how to validate this message is appears properly or not
regular expression in qtp standar check point for months from accepting months from january to december only
What is the difference in the global and action sheet in qtp?
They asked by using qtp recording writing scripting
Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?
Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly
What is quicktest professional?
In order to select an automation tool for automating ur application, what r the things u need to consider? For eg i will go for automation; 1) When there is a lot of retesting and regression testing. 2) Return on investments. 3) Whether the tool supports the appln. 4)--------------, etc. Pls give me more number of points because my answer did not satisfy the interviewer. Very urgent pls