Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write code to read and write data from file?



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

Post New Answer

More QTP Interview Questions

how can we do the frame work in qtp

0 Answers   L&T,


What is smart identification?

2 Answers   Ordain Solutions,


Explain the keyword createobject with an example.

1 Answers  


how to re-install QTP 9.0 trial version.

25 Answers  


Is there a function to find the number of occurrences of sub strings within a string?

1 Answers  


How many types of status are there?

0 Answers  


Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement

0 Answers  


w is output value

3 Answers   MBT,


what is the use of automation objective model?where is used? plz tell me

2 Answers  


in QTP we test web based application at that time what script is run? is support vb script? plz tell me

3 Answers  


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

0 Answers  


What is an Regular expression doing in VBScript?Tell the pattern for the email verification.

1 Answers   Accenture,


Categories