asp中创建多级目录的两段代码

2019-04-02 09:00:23丽君

                        CreateFolderSub = ""
                        For ii = 0 To i
                                CreateFolderSub = CreateFolderSub & CreateFolderArray(ii) & "/"
                        Next
                        PhCreateFolderSub = Server.MapPath(CreateFolderSub)
                        If Not objFSO.FolderExists(PhCreateFolderSub) Then
                                objFSO.CreateFolder(PhCreateFolderSub)
                        End If
                Next
                If Err Then
                        Err.Clear()
                Else
                        BlInfo = True
                End If
                CreateMultiFolder = BlInfo
        End Function

上面的是循环
下面的是正则

        '==============================
        ''创建文件目录(多层)
        ''使用正则
        '==============================

        Function Create_N_Folder(save, ByVal Path)