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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between vbscript and vba?

1130


Which in-built function related to an array joins substrings into one string in the vbscript language?

959


How will you get a combined string from array of string in vbscript?

960


Explain a few date functions in vbscript

990


when we use filter funtiom invb script(QTP)

2784


1. How do declare public variable in vb scripts?

2132


Which operator is used to perform the comparison among 2 operands in the vbscript language?

970


Mention what is the main difference between function and sub-procedure?

1058


Which date function is used in the vbscript language to find the difference between the 2 dates?

1063


Mention what is the technology used by vb script?

980


Explain the arrays in vb script?

1067


Mention what is byref and byval parameters in vbscript?

1014


Mention characteristics of sub procedures?

1053


Explain about tristate constants in vbscript?

1082


Why is error handling required?

1024