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
How will you get the natural logarithm of the given number in vbscript?
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
What is the technology used by vb script?
Which data type/types are supported by vbscript language and what are their specialties?
please can you help me to get a code of flames using a visual basic 6
Explain the operator precedence in vb script?
What are the 2 ways in which a variable can be declared in the vbscript language?
What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
Why to use option explicit in vb script?
Does VB/Win make standalone .EXE files?
How will you check that a variable is an array in vbscript?
how to operate webobjects in a webpage using getobject function and then using generic methods?
what do you mean .ota mobile format