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
what is the advantages and disadvantages of using functions instead of re usable actions
How to define array in qtp?
How does qtp recognize objects in aut?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
how to idetfy which test cases are automated?who will deside that plz tell me
Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version
"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...
How to test the login page in different ways in automation testing and i need code?
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
What is a recovery scenario?
How to find operating system information using the qtp script?
What is the difference between shared and local object repository?
What is parameter in qtp?
How do you convert manual test cases to automated test cases?
what is the difference between data driver & data driven and driver script?