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

write a vb script to display the size of the folder,date created and name of the folder

1 Answers  


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

0 Answers  


What is the difference between vb debugger and the script debugger?

0 Answers  


What are class variables?

0 Answers  


Mention what is the use of option explicit in vbscript?

0 Answers  






Mention what are the rules to name variable in vbscript?

0 Answers  


write a vb script to generate the following pattern ***** **** *** ** *

7 Answers   Blue Star,


How can you fetch the value of a cookie?

0 Answers  


did any one attended interview in applabs if you had gone through plz tell me the procedure

0 Answers  


What is vbscript?

0 Answers  


What is Procedure or Subroutine in VB Script?

0 Answers  


Mention how you can call vbscript functions?

0 Answers  


Categories