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 Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

0 Answers   Quest,


write a vb script to display the number is odd or even and whether it is divisible by 9 or not

2 Answers  


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

0 Answers  


What purpose does ‘on error resume next’ serves?

0 Answers  


How to take whole text output from screen of Bitmap Application.

0 Answers   CitiGroup,






hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?

0 Answers  


Hi, can any one tell this Actually I AM NEW TO QTP I have one qtp script in which it calls the vbs file during it's run TIME by using the ExecuteFile "absolute path" If the vbs file is executed seperately it will give the output in a msgbox In the same way if qtp script is executed the result will be displayed in w result window right? Now the question is how to get that vbs file output in the qtp result window when I run the qtp script which calls the vbsfile during it's run TIME

1 Answers  


How to return a value from function...? you should not tell msgbox, print.. etc.,

6 Answers  


Can u describe what kind of testing are for OTC derivates by banks.

0 Answers   BoA,


join all the array values without using join function?

1 Answers   CSS Corp,


Explain the adodb.stream class?

0 Answers  


write any ttest cases using check points and parameterization

0 Answers  


Categories