Share ASP FSO Delete file DeleteFile and folder DeleteFolder instance code

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.