<label id="2a06w"><tt id="2a06w"></tt></label><label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label><menu id="2a06w"></menu>
  • <dfn id="2a06w"><var id="2a06w"><label id="2a06w"></label></var></dfn>
    <sup id="2a06w"><button id="2a06w"><em id="2a06w"></em></button></sup>
    <dfn id="2a06w"><var id="2a06w"></var></dfn>
    <dfn id="2a06w"></dfn>
  • <dfn id="2a06w"><code id="2a06w"><ins id="2a06w"></ins></code></dfn>
  • <small id="2a06w"><samp id="2a06w"></samp></small>
  • <dfn id="2a06w"><table id="2a06w"><center id="2a06w"></center></table></dfn>
    <label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label>
    <strike id="2a06w"><form id="2a06w"></form></strike>
    <menu id="2a06w"><tt id="2a06w"></tt></menu>

    將想法與焦點(diǎn)和您一起共享

    FSO創(chuàng)建多級(jí)文件夾發(fā)布者:本站     時(shí)間:2020-05-06 16:05:21

    FSO中有個(gè)方法是CreateFolder,但是這個(gè)方法只能在其上一級(jí)文件夾存在的情況下創(chuàng)建新的文件夾,所以我就寫了一個(gè)自動(dòng)創(chuàng)建多級(jí)文件夾的函數(shù),在生成靜態(tài)頁面等方面使用非常方便.

    函數(shù):

    ' --------------------------------
    ' 自動(dòng)創(chuàng)建指定的多級(jí)文件夾
    ' strPath為絕對(duì)路徑
    ' 引用請(qǐng)保留版權(quán)
    ' by im286_Anjer
    ' 2005-4-3
    Function AutoCreateFolder(strPath) ' As Boolean
    On Error Resume Next

    Dim astrPath, ulngPath, i, strTmpPath
    Dim objFSO

    If InStr(strPath, "") <=0 Or InStr(strPath, ":") <= 0 Then
    AutoCreateFolder = False
    Exit Function
    End If
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    If objFSO.FolderExists(strPath) Then
    AutoCreateFolder = True
    Exit Function
    End If
    astrPath = Split(strPath, "")
    ulngPath = UBound(astrPath)
    strTmpPath = ""
    For i = 0 To ulngPath
    strTmpPath = strTmpPath & astrPath(i) & ""
    If Not objFSO.FolderExists(strTmpPath) Then
    ' 創(chuàng)建
    objFSO.CreateFolder(strTmpPath)
    End If
    Next
    Set objFSO = Nothing
    If Err = 0 Then
    AutoCreateFolder = True
    Else
    AutoCreateFolder = False
    End If
    End Function

    調(diào)用方法:

    MyPath = "C:abc"
    If AutoCreateFolder(MyPath) Then
    Response.Write "創(chuàng)建文件夾成功"
    Else
    Response.Write "創(chuàng)建文件夾失敗"
    End If



    選擇我們,優(yōu)質(zhì)服務(wù),不容錯(cuò)過
    1. 優(yōu)秀的網(wǎng)絡(luò)資源,強(qiáng)大的網(wǎng)站優(yōu)化技術(shù),穩(wěn)定的網(wǎng)站和速度保證
    2. 15年上海網(wǎng)站建設(shè)經(jīng)驗(yàn),優(yōu)秀的技術(shù)和設(shè)計(jì)水平,更放心
    3. 全程省心服務(wù),不必?fù)?dān)心自己不懂網(wǎng)絡(luò),更省心。
    ------------------------------------------------------------
    24小時(shí)聯(lián)系電話:021-58370032
    99人妻中文字幕视频在,亚洲无码视频在线免费看,久久国产乱子伦免费精品,日本中文字幕色视频网站
    <label id="2a06w"><tt id="2a06w"></tt></label><label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label><menu id="2a06w"></menu>
  • <dfn id="2a06w"><var id="2a06w"><label id="2a06w"></label></var></dfn>
    <sup id="2a06w"><button id="2a06w"><em id="2a06w"></em></button></sup>
    <dfn id="2a06w"><var id="2a06w"></var></dfn>
    <dfn id="2a06w"></dfn>
  • <dfn id="2a06w"><code id="2a06w"><ins id="2a06w"></ins></code></dfn>
  • <small id="2a06w"><samp id="2a06w"></samp></small>
  • <dfn id="2a06w"><table id="2a06w"><center id="2a06w"></center></table></dfn>
    <label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label>
    <strike id="2a06w"><form id="2a06w"></form></strike>
    <menu id="2a06w"><tt id="2a06w"></tt></menu>