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 sql loader? Explain the files used by sql loader to load file?
How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.
what is event handling?
What methods are used to create text files and open text files in the vbscript language?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
For a webbased application:- what should be code in expert veiw, for retrieving a single column name "username" from a server and checking whether exported "username" from datatable doesn't exist in server. suppose i have saved in excelsheet a username="gayatri" , which is exported, then checked for whether this username "gayatri" exist in server database or not ? if exist then allow to enter new username, which should be again checked for in loop , or else come out of loop and enter a distinct "username". plz let me have this answer in my id gayatrisahooin@hotmail.com
Why is error handling required?
How will you get the natural logarithm of the given number in vbscript?
How will you get a random number between 0 and 1 in vbscript?
Explain about tristate constants in vbscript?
What is vbscript procedures?
When are redim statement and preserve keyword used in the vbscript language?
Which in-built function is used to format the number in the vbscript language?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Explain about scrrun.dll?