zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

asp实现检查目录是否存在与建立目录的函数

ASP 实现 函数 目录 是否 建立 存在 检查
2023-06-13 09:13:57 时间
"-------------------------
"--检查目录是否存在
"----------------------
Function CheckDir(byval FolderPath)
    dim fso
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    If fso.FolderExists(Server.MapPath(folderpath)) then
    "存在
        CheckDir = True
    Else
    "不存在
        CheckDir = False
    End if
    Set fso = nothing
End Function

"-------------------------
"--建立目录
"----------------------
Function MakeNewsDir(byval foldername)
    dim fso
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
        fso.CreateFolder(Server.MapPath(foldername))
        If fso.FolderExists(Server.MapPath(foldername)) Then
           MakeNewsDir = True
        Else
           MakeNewsDir = False
        End If
    Set fso = nothing
End Function