Create a file system object to do the following
i. Create a folder
ii. Create a text file in the folder
iii. Update text file with some tex
Answer Posted / saravanan_jasmin
set objF=CreateObject("Scripting.FileSystemObject")
Set objW = WScript.CreateObject("WScript.Shell")
curr = objW.CurrentDirectory
path=curr&"folder"
txtpath=path&" extfile.txt"
objF.CreateFolder(path)
objF.CreateTextFile(txtpath)
set objWrite=objF.OpenTextFile(txtpath,2)
objWrite.Write("someText")
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
Which operator can be used to change the value of the operand or change the state of the condition?
Explain the operator precedence in vb script?
why variable name should not exceed 255 characters?
Why is error handling required?
What is event handling in vbscript?
What is the extension of the vbscript file?
Explain the string concatenation function in vbscript?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
What are keywords in the vbscript language?
Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?
What are the rules to name variable in vbscript?
1. How do declare public variable in vb scripts?
Mention how you can call vbscript functions?