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

Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?

0 Answers  


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

0 Answers   Quest,


What are subprocedures in vbscript?

0 Answers  


Why is it recommended to close the database connection every time after the work is completed?

0 Answers  


Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance..

3 Answers   Amazon, bcbs,


which one is more secure vb script or java script ??????? or both are same ??????

3 Answers  


How to write functions and sub in vb script?

0 Answers  


How to create a function in vbscript?

0 Answers  


how to increasing the numbers in a given text box please write a vb script

0 Answers  


What is dictionary object in vbscript? Explain?

0 Answers  


plz give ans to this in vb script........ "krishna radha" i want to print this string "Radha Krishna" like this

5 Answers  


Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

0 Answers  


Categories