【www.gdgbn.com--安卓教程】


"==============================
 "函 数 名: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

本文来源:http://www.gdgbn.com/shoujikaifa/20751/