ASP DeleteFolder Method
Definition and Usage
The DeleteFolder method deletes one or more specified folders.
Note:If you try to delete a non-existent folder, an error will occur.
Syntax:
FileSystemObject.DeleteFolder(foldername[,force])
parameter | description |
---|---|
foldername | required. The name of the folder to be deleted (wildcards can be used). |
force | optional. Indicates whether the read-only folder can be deleted. True indicates that the read-only folder will be deleted, while False indicates that the read-only folder will not be deleted. The default is False. |
instance
<% dim fs set fs=Server.CreateObject("Scripting.FileSystemObject") if fs.FolderExists("c:\temp") then fs.DeleteFolder("c:\temp") end if set fs=nothing %>