最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
删除文件或文件夹
时间:2022-07-02 23:07:50 编辑:袖梨 来源:一聚教程网
删除文件或文件夹
Sub DelAll()
Dim FolderId,FileId,ThisDir,FileNum,FolderNum,FilePath,FolderPath
FolderId = Split(Request.Form("FolderId"),",")
FileId = Split(Request.Form("FileId"),",")
ThisDir = trim(Request.Form("ThisDir"))
FileNum=0
FolderNum=0
If Ubound(FolderId) -1 then '删除文件夹
For i = 0 to Ubound(FolderId)
FolderPath = Server.MapPath(UploadFolder) & ThisDir & "" & trim(FolderId(i))
If Fso.FolderExists(FolderPath) then
Fso.DeleteFolder FolderPath,true
FolderNum = FolderNum + 1
End If
Next
End If
If Ubound(FileId) -1 then '删除文件
For j = 0 to Ubound(FileId)
FilePath = Server.MapPath(UploadFolder) & ThisDir & "" & trim(FileId(j))
If Fso.FileExists(FilePath) then
Fso.DeleteFile FilePath,true
FileNum = FileNum + 1
End If
Next
End If
Response.write ""
End Sub
相关文章
- 完美世界异环最新消息 2024年上线时间及测试动态 05-14
- 异环鬼火坐骑怎么获取 异环鬼火摩托获取方法与技巧详解 05-14
- 异环粉爪积分获取方法大全 异环粉爪积分快速提升技巧与途径 05-14
- 异环海月 异环海月角色背景、技能解析与实战玩法指南 05-14
- 异环伊洛伊怎么样 异环伊洛伊强度解析与实战表现评价 05-14
- 王者荣耀世界角色强度排行 王者荣耀世界当前版本强势英雄推荐 05-14