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 a vb script to open a text file and write into it

Answers were Sorted based on User's Feedback



write a vb script to open a text file and write into it..

Answer / mudaseer

dim vfso
set vfso=createobject("scripting.filesystemobject")
set vf=vfso.opentextfile("C:\hello.txt",2)
vf.write("howruthere")


'here 2 is for write and 8 is for append

Is This Answer Correct ?    2 Yes 0 No

write a vb script to open a text file and write into it..

Answer / sojan davis- infosys

Const ForWriting = 2,
Dim fso, fileObj
Set fso = CreateObject("Scripting.FileSystemObject")
Set fileObj = fso.OpenTextFile(strConfigFile, ForWriting,
True)
fileObj.WriteLine("Hi")

fileObj.Close
Set fileObj=Nothing
Set fso=Nothing

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More VB Script Interview Questions

What methods are used to create text files and open text files in the vbscript language?

0 Answers  


If anyone knows abt Test Complete material, Pls let me Know. if u have any material or any documents..... Pls mail me on this mail Id...... This is very Urgent Requirment..... for my Project.....

3 Answers  


a function that takes an integer array as an argument and returns the largest value in the array. Use the function in a program

1 Answers  


write a vb script to display the number is odd or even and whether it is divisible by 9 or not

2 Answers  


Mention what is the use of option explicit in vbscript?

0 Answers  


How can I get the value of an object property or variable in another frame?

1 Answers   Citi Bank,


did any one attended interview in applabs if you had gone through plz tell me the procedure

0 Answers  


How to remove the spaces in a string Ex: "this is apple"

5 Answers   Cap Gemini,


Mention what is vbscript?

0 Answers  


Mention what is byref and byval parameters in vbscript?

0 Answers  


write a vb script to open a text file and write into it

2 Answers  


Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)

0 Answers   TCS, Wipro,


Categories