write code to read and write data from file?
Answer / rdshet
Hi,
Set fso = CreateObject("Scripting.FilesyStemObject")
Set fil = fso.CreateTextFile("D:\test.txt", TRUE)
fil.writeline "this is text 1 " ' Writing
fil.writeline "this is text 2 "
fil.writeline "this is text 3 "
fil.close
IF fso.FileExists("D:\test.txt") =TRUE Then
Set fil1 =fso.OpenTextFile ("D:\test.txt",1)
DO WHILE NOT fil1.atendofstream
flread = fil1.ReadLine 'Reading
msgbox flread
LOOP
flread.close
Set flread = NOTHING
END IF
Set fil = NOTHING
Set fso = NOTHING
Regds
Raghavendra
Please correct me if am wrong.
| Is This Answer Correct ? | 2 Yes | 1 No |
what do you call the window testdirector-testlab?
What is Distributed testing? How does UFT support it?
How the smart identification is used in real time?Please explain with an example
What is obsolute path and relative path in QTP..? How to access them and what are the differences between them...??
I have a string "Redfort is in Delhi" how do u write vbscript for " Delhi in is Redfort"
How do I modify a value of an elemnt which is not the first one in xml file? My sample XML file is like: <Environment> <Variable> <Name>Name</Name> <Value>Uday Kumar</Value> </Variable> <Variable> <Name>Designation</Name> <Value>Senior Software Engineer</Value> </Variable> </Environment> for example, I'd like to change the value 'Senior Software Engineer' to 'Student' in the second element. How do I do it in QTP?
how can i do QTP Certification can any 1 tell me . How 1 approch and who to approch
we have 10 automation scripts. how to call them from one main script.
How do you delete unwanted results in qtp?
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
What are the properties you would use for identifying a browser & page when using descriptive programming ?
How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?