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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which function is used to perform string comparison?

826


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

829


What is the use of the formatdatetime function in the vbscript language?

788


Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.

2784


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

1149


How are arrays declared in the vbscript language?

775


i have a problem with this error(this error related edit and delete button,when i click this button in datagrid..i will get this error)"Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation." this is my code : <%@ Page Language="VB" Debug="false" %> <%@ import Namespace="Sytem.Data" %> <%@ import Namespace="System.Data.OleDB" %>

(Search Based On Staff I.C No) IC.No (XXXXXX-XX-XXXX)   ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> Total Leave Taken : Days

2545


What are class variables?

825


Explain about scrrun.dll?

739


When to use function procedures and what are its characteristics?

829


Mention what is the difference between vbscript and vba?

753


What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?

800


What is byref and byval parameters in vbscript?

843


why variable name should not exceed 255 characters?

2013


What is loose binding? Why is it not a good practice to use it?

892