write script to read and write data from file ?

Answer Posted / lakshmi

First u create obj for file
set fso=createobject("scripting.filesystemobject")
set <var>=fso.opentextfile("FileName",[IOMode],[create])
IOModes 1-Readonly Create-True
2-Write False
8-append
Readline,writeline...use to access the data.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In qtp, explain what is crypt object

592


if anyone has idea of the interview procedure in covansys, plz send me a mail?

1526


What are the key points to create a framework in QTP for oracle forms?

1807


What is the syntax for how to call one script from another?

556


A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

1276






What are the steps involved in recovery scenario wizard?

521


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What is the difference between them? How to handle script issues?

562


We stored into the objects OR and then write the scripting

1539


Describe the differences between functions and actions in UFT?

608


action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans

1626


how to find that tools work well with ur existing system?

1352


How to customize qtp?

608


Can anybody let me know how to test the Drag and drop feature of the column in a .net application...eg..i hav to test the drag and drog feature of a table(swftable) in a application..plze help!!

1747


On what document base Descriptive programming is written if build is not yet ready ?

873


What should we say if interviewer asks "What is ur project architecture?".......Can any one help me with clear information.?????????

1716