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

Explain about arrays in vb script?

0 Answers  


Explain about the support of asp for vb script functionality?

0 Answers  


how to retrive the tooltip by using descriptive programming in qtp?

3 Answers   iGate,


can anybody tell vb script code for alphanumeric and special character .which is used in qtp the name text field.

1 Answers  


Difference between Function and Sub routine?

0 Answers   Polaris,


what is the difference between modular and data and keyword driven framework

0 Answers  


What methods are used to create text files and open text files in the vbscript language?

0 Answers  


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

0 Answers  


write a text script to display * as below ********** **** **** *** *** ** ** * * * * ** ** *** *** **** **** **********

1 Answers  


What are class variables?

0 Answers  


What are subprocedures in vbscript?

0 Answers  


If else for do while select in vb script?

0 Answers  


Categories