'以下内容复制保存入file.asp文件
<%
'删除文件处理过程,传递文件相对路径
Sub DeleFile(FilePath)
Set Del=Server.CreateObject("Scripting.FileSystemObject")
If Err <> 0 Then
Response.Write ""
Err.clear
Else
If InStr(FilePath,", ") > 0 then
Msg=""
FilePath=Split(FilePath,", ")
For i = 0 to ubound(FilePath)
If Del.FileExists(Server.MapPath(FilePath(i)))=True Then
Del.DeleteFile Server.MapPath(FilePath(i)),True
Else Msg=Msg&"\n文件"&FilePath(i)&"不存在!"
End If
Next
Response.Write ""
Else
If Del.FileExists(Server.MapPath(FilePath))=True Then
Del.DeleteFile Server.MapPath(FilePath),True
Response.Write ""
Else Response.Write ""
End If
End If
End If
Set Del=Nothing
End Sub
'删除文件夹过程,传递文件夹相对路径
Sub DeleFolder(FolderPath)
Set Del=Server.CreateObject("Scripting.FileSystemObject")
If Err <> 0 Then
Response.Write ""
Err.clear
Else
If Del.FolderExists(Server.MapPath(FolderPath))=True Then
Del.DeleteFolder Server.MapPath(FolderPath),True
Response.Write ""
Else Response.Write ""
End If
End If
Set Del=Nothing
End Sub
%>
<%
'创建文件操作对象
FLRoot="upload/"'定义管理文件根目录
FLPath=Request("FLPath")
FFPath = Server.MapPath(FLRoot&FLPath)
IF Len(FFPath)=2 then FFPath=FFPath&"\" End If
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(FFPath) Then
Response.write "