当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP DeleteFolder 方法
The DeleteFolder method deletes one or more specified folders.
DeleteFolder的作用是删除一个或多个指定的文件夹
Note: An error will occur if you try to delete a folder that does not exist.
注意:如果你试图删除一个不存在的文件夹的话将导致错误产生。
FileSystemObject.DeleteFolder(foldername[,force]) |
Parameter参数 | Description描述 |
---|---|
foldername | Required. The name of the folder or folders to delete (Wildcards are allowed) 必要组件。设定需要被删除的文件夹的名称(可以使用通配符) |
force | Optional. A Boolean value that indicates whether read-only folders will be deleted. True indicates that read-only folders will be deleted, False indicates that they will not be deleted. Default is False |
<% dim fs set fs=Server.CreateObject("Scripting.FileSystemObject") if fs.FolderExists("c:temp") then fs.DeleteFolder("c:temp") end if set fs=nothing %> |