最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
自动创建多级目录,有则跳过 无则创建,
时间:2022-07-02 23:04:46 编辑:袖梨 来源:一聚教程网
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
' 创建
objFSO.CreateFolder(strTmpPath)
End If
Next
Set objFSO = Nothing
If Err = 0 Then
AutoCreateFolder = True
Else
AutoCreateFolder = False
End If
End Function
相关文章
- 归龙潮最新兑换码大全 2025长期可用兑换码汇总 09-17
- 禁闭求生2怎么做蜜蜂护肩 蜜蜂护肩制作方法 09-17
- 超自然行动组兑换码入口在哪 兑换码入口及领取方式 09-17
- 明日方舟无忧梦呓突袭挂机过关攻略 09-17
- 地下城堡4白茗草采集位置 09-17
- 不朽箴言心愿单设置推荐 09-17