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

Both Static and dynamic arrays are handled by VB script. Is it true?

0 Answers  


My Salary is 65000. How Much TDS I have to pay

0 Answers  


What is parametrization ?

9 Answers  


What is the difference between function and procedure?

0 Answers  


how to acces the remote mechine using vb cript(QTP)

0 Answers   TCS,


Hi, Anybody could you Please tell me How to write the script for Checking whether given number is Prime Number or not..Thanks in Advance

6 Answers   Amazon,


Which operator is used to concatenate the 2 values in the vbscript language?

0 Answers  


Hi I don't have any idea on VBscript. can any one point me to a good web site to learn VBscript. Regards lina

2 Answers  


who you define variables and functions in VB?

1 Answers  


How to create a function in vbscript?

0 Answers  


what is the features of visual basic?

0 Answers  


Explain about vb script?

0 Answers  


Categories