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
What are the 2 ways to pass a value to the function?
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
What are subprocedures in vbscript?
Mention the environments where vbscript could be run?
Explain about scrrun.dll in vbscript?
How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...
Explain the string concatenation function in vbscript?
How will you reverse a string in vbscript?
How to capture a runtime error in vbscript?
Description.Create
How will you get the natural logarithm of the given number in vbscript?
How to Enter Values on the Command promt using VB script
What are lbound and ubound in the vbscript language?
Explain few date functions in vbscript?