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
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
How do you declare a variable in vbscript?
When are redim statement and preserve keyword used in the vbscript language?
Explain the scope of the variables using dim, public, and private keywords respectively.
what is the standards used for writing the script in QTP
Which object provide information about a single runtime error in a vbscript?
Explain the filter expression?
Mention what is the use of option explicit in vbscript?
Mention what is vbscript?
Explain about operator precedence in vb script?
how does vb script help in web page designing? explain with example.
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
Difference between dim,public and private variables in vb script?
PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com
What is the difference between VBScript and JavaScript?