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 is the purpose of on error resume next statement?
Why is it recommended to close the database connection every time after the work is completed?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
Explain about tristate constants?
How to get the length of the string by making use of the string function?
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
What are string functions in vbscript?
hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?
What are the different types of loops available in the vbscript language?
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
Explain about scrrun.dll?
what is the difference between modular and data and keyword driven framework
How can you fetch the value of a cookie?
How do i automate a website www.flyashx.com without having any test cases witin a week time.
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?