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
What is the difference between vbscript and vba?
Which in-built function related to an array joins substrings into one string in the vbscript language?
How will you get a combined string from array of string in vbscript?
Explain a few date functions in vbscript
when we use filter funtiom invb script(QTP)
1. How do declare public variable in vb scripts?
Which operator is used to perform the comparison among 2 operands in the vbscript language?
Mention what is the main difference between function and sub-procedure?
Which date function is used in the vbscript language to find the difference between the 2 dates?
Mention what is the technology used by vb script?
Explain the arrays in vb script?
Mention what is byref and byval parameters in vbscript?
Mention characteristics of sub procedures?
Explain about tristate constants in vbscript?
Why is error handling required?