VBScript » Folder » Delete

Version: 3.0

Syntax:
object.Delete [force]
force
The force parameter is a Boolean value - True allows the deletion of read-only folders while False (the default) does not.

Deletes the specified folder.

The method used to delete the folder (and any contents) relating to the specified Folder object.

Note that trying to delete a folder that doesn't exist will cause an error.

Examples

Code:
<%
dim filesys, demofolder
set filesys = CreateObject ("Scripting.FileSystemObject")
set demofolder = filesys.GetFolder("c:\projects\")
demofolder.Delete
%>