| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 628 人关注过本帖
标题:[转帖]关于FSO删除文件或文件夹
只看楼主 加入收藏
风雨中
Rank: 1
等 级:新手上路
帖 子:213
专家分:0
注 册:2005-10-6
收藏
 问题点数:0 回复次数:0 
[转帖]关于FSO删除文件或文件夹
关于FSO删除文件或文件夹dim fso=server.createobject("script.fileSystemObject") if fso.folderexists(Server.MapPath(filename)) then fso.deleteFolder(Server.MapPath(filename)) end if 删除文件 if fso.FileExists(Server.MapPath(filename)) then fso..DeleteFile(Server.MapPath(filename)) end if 删除文件函数: Function DeleFile(FilePath) On Error Resume Next Set Del=Server.CreateObject("Scripting.FileSystemObject") if Err <> 0 Then DelFile="该空间不支持FSO组件或者文件路径错误!" else if InStr(FilePath, ",") > 0 then FilePath=Split(FilePath,",") For i = 0 to ubound(FilePath) If Del.FileExists(Server.MapPath(FilePath))=True Then Del.DeleteFile Server.MapPath(FilePath(i)),true Next Else If Del.FileExists(Server.MapPath(FilePath))=True Then Del.DeleteFile Server.MapPath(FilePath),true End if End if Set Del=Nothing End Function
搜索更多相关主题的帖子: FSO 转帖 文件 删除 
2005-10-19 09:34
快速回复:[转帖]关于FSO删除文件或文件夹
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050554 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved