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

Answers were Sorted based on User's Feedback



Create a file system object to do the following i. Create a folder ii. Create a text file in t..

Answer / usha

set fso=createobject("scripting.filesystemobject")

set f= fso.createfolder("C:UserssingarsyDesktopusha")

set file= f.createTextFile("abc.txt",2)

file.write("masdkmas.........")

Is This Answer Correct ?    1 Yes 0 No

Create a file system object to do the following i. Create a folder ii. Create a text file in t..

Answer / 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

More VB Script Interview Questions

Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

0 Answers  


HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?

1 Answers   TCS,


In qtp, how to use XML files for framework. if the XML files are more Efficient than Excel files?

1 Answers  


what is test scenario?

1 Answers  


How will you generate Reports using Vb Script?it asked in testing(QTP)Interview.Plz Any Body Let me know. Thanks uday Uday_testing@yahoo.co.in

4 Answers   NIIT,






Description.Create

0 Answers   IBM,


best training centre in bangalore

2 Answers  


Please Example programms on vbscript 1)writing functions and calling functions

2 Answers   CIL, TCS,


write a vb script create 5 folders test1 test2 test3 test4 test5

3 Answers  


w r p syed then output was deys and click eysd and click ysde and click sdey and click deys and click eysd............

2 Answers   Cap Gemini, iGate,


Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...

0 Answers  


What are the data types supported by vbscript?

0 Answers  


Categories