'==============================
'函 數 名:DelFolder
'作 用:刪除檔案夾
'參 數:檔案夾相對路徑FolderPath
'==============================
Function DelFolder(FolderPath)
If IsFolder(FolderPath)=True Then
Set Fso=Server.CreateObject("Scri"&"pting.File"&"Sys"&"temObject")
Fso.DeleteFolder(Server.MapPath(FolderPath))
Set Fso=Nothing
End If
' Select Case Err
' Case 424 Response.Write("方卡錯誤提示:刪除"&FolderPath&"檔案夾時,路徑未找到或者該目錄沒有寫入許可權!")
' End Select
End Function
'==============================
'函 數 名:DelFile
'作 用:刪除檔案
'參 數:檔案相對路徑FilePath
'==============================
Function DelFile(FilePath)
' On Error Resume Next
If IsFile(FilePath)=True Then
Set Fso=Server.CreateObject("Scri"&"pting.File"&"Sys"&"temObject")
Fso.DeleteFile(Server.MapPath(FilePath))
Set Fso=Nothing
End If
' Select Case Err
' Case 424 Response.Write("方卡錯誤提示:刪除"&FilePath&"檔案時,路徑未找到或者該目錄沒有寫入許可權!")
' End Select
End Function