ASP FSO Tutorial: The ASP Delete method deletes a method that deletes the specified file or folder. This article asks you to share ASP fso Delete file DeleteFile and folder DeleteFolder instance code.
ASP FSO Delete file DeleteFile and folder DeleteFolder
' ============================== ' function name: Delfolder ' for use: Delete folder ' parameter : Folder relative path 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 ' 424 Response.Write ("Side card error: Delete &FolderPath&" folder, path not found or the directory does not have write permission!) ") ' End Select End Function
' ============================== ' function name: Delfile ' for use: Delete file ' parameter : File relative path 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 ' 424 Response.Write ("Side card error prompt: Delete &FilePath&" file, path not found or the directory does not have write permission!) ") ' End Select End Function
"Recommended"
1. Summarize the ASP FSO Tutorial--asp Delete method
2. asp Deltextfile Delete the specified file instance under the specified folder tutorial