Deletes a specified folder and its contents.<br>
<br>
object.DeleteFolder folderspec[, force] <br>
<br>
Arguments <br>
object<br>
<br>
Required. Always the name of a FileSystemObject.<br>
<br>
folderspec<br>
<br>
Required. The name of the folder to delete. The folderspec can contain wildcard characters in the last path component.<br>
<br>
force<br>
<br>
Optional. Boolean value that is True if folders with the read-only attribute set are to be deleted; False (default) if they are not.<br>
<br>
Remarks<br>
The DeleteFolder method does not distinguish between folders that have contents and those that do not. The specified folder is deleted regardless of whether or not it has contents. <br>
<br>
An error occurs if no matching folders are found. The DeleteFolder method stops on the first error it encounters. No attempt is made to roll back or undo any changes that were made before an error occurred.<br>
<br>
The following example illustrates use of the DeleteFolder method: <br>
<br>
Sub DeleteAFolder(filespec)<br>
Dim fso<br>
Set fso = CreateObject("Scripting.FileSystemObject")<br>
fso.DeleteFolder(filespec)<br>
End Sub<br>
DeleteFile Method<br>
Deletes a specified file.<br>
<br>
object.DeleteFile filespec[, force] <br>
<br>
Arguments <br>
object<br>
<br>
Required. Always the name of a FileSystemObject.<br>
<br>
filespec<br>
<br>
Required. The name of the file to delete. The filespec can contain wildcard characters in the last path component.<br>
<br>
force<br>
<br>
Optional. Boolean value that is True if files with the read-only attribute set are to be deleted; False (default) if they are not.<br>
<br>
Remarks<br>
An error occurs if no matching files are found. The DeleteFile method stops on the first error it encounters. No attempt is made to roll back or undo any changes that were made before an error occurred.<br>
<br>
The following example illustrates use of the DeleteFile method: <br>
<br>
Sub DeleteAFile(filespec)<br>
Dim fso<br>
Set fso = CreateObject("Scripting.FileSystemObject")<br>
fso.DeleteFile(filespec)<br>
End Sub<br>保留:: http://www.qqread.com/asp/2006/10/d239901.html进入讨论组讨论。
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- asp+ajax打造无刷新新闻评论系统 (846次浏览)
- 绝对免费顶级域名+免费500MB ASP?? (728次浏览)
- ASP后门之终极伪装 (601次浏览)
- FTP的安全问题 《转》 (589次浏览)
- 如何正确显示数据库中的图片 (503次浏览)
- 用户登录/注册程序——Flash+ASP (492次浏览)
- SQL注入漏洞全接触 (381次浏览)
- asp+sqlserver 分页方法(不用存储过程) (314次浏览)
- Windows操作系统出现死机故障的解决方法 (202次浏览)
- 对ASP 动态包含文件方法的改进 (152次浏览)



