how to delete folder test3,test4 and test5 using vbscript?

Answers were Sorted based on User's Feedback



how to delete folder test3,test4 and test5 using vbscript?..

Answer / mudaseer

dim vfso
set vfso=createobject("scripting.filesystemobject")
for i=3 to 5
vfso.deletefolder "C:\test" &i
next

Is This Answer Correct ?    1 Yes 0 No

how to delete folder test3,test4 and test5 using vbscript?..

Answer / manjunathareddy

Dim Fso
Set Fso=CreateObject("Scripting.FileSystemObject")
For i=3 to 5
Fso.DeleteFolder("C:\Test"&i)
Next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

How will you convert a string to lower case string using vbscript?

0 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,


write a vb script to find simple interest using functions

1 Answers  


I am running a windows based application.While running the script on QTP ,The Application pop-up an Error Message as "object Disabled" in two different scenarios Scenario 1-->The Application pop-up up a Message for Max Session Reached(as the application is set to hold 2 session and if if crosses the pre-defined limit then the error message pop-up) Scenario 2-->When Network connectivity is disabled the Application screen gets greyed out in colour with no operation possible. Now through Exception handling features in QTP ,we need to do the following For Scenarion 1-->Through Exception handling we need to just accept the Message pop-up in the Application and and resume with the call function as is for Scenario 2--> Through Exception Handling featutes on QTP we need to shut down the client , restart the client and resume the call functions as it is Note: The Application returns an Error Message as "object disabled" in both the cases i.e for pop-up message and when the Apllication getting greyed out due to Network failure how can we enhance the script in such a way that for the same error message retured by the application in two different and how to handle them????

2 Answers   Sasken,


Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks

0 Answers  






Have any one know about Test Complete 6, please let me know. If any one have good material regarding Test Complete 6, Please send to my mail id: cns.praveen@gmail.com

1 Answers  


Can any 1 modify the code whr in want to add\rename a excel sheet in qtp?

1 Answers  


How to Import data from a file (file is on the desktop) to the data table

1 Answers   IBM,


Mention what is the technology used by vb script?

0 Answers  


1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 how to find using vbscripting

3 Answers  


how to add the shared repository file to the script file while running the script manuall

2 Answers  


how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP

1 Answers   Accenture,


Categories