首页 > 开发 > Asp > 正文

asp按照指定目录使用fso创建文件夹代码

2020-09-12 12:57:39
字体:
来源:转载
供稿:网友
 asp按照指定目录使用fso创建文件夹代码:

Sub EFolder(FolderName)
Dim FSO
Set FSO=Server.CreateObject("Scripting.FileSystemObject")
If Fso.folderexists(Server.MapPath(FolderName)) Then
Set FSO=Nothing
Exit Sub
Else
FSO.CreateFolder(Server.MapPath(FolderName))
End If
Set FSO=Nothing
End Sub
'===================================================================
Sub ArrayFolder(Path,sep)
Dim ArrayPath,EPath,newPath
ArrayPath = split(Path,sep)
newPath=""
for each Epath in ArrayPath
newPath=newPath&Epath&"/"
newPath = replace(newPath,"//","/")
EFolder newPath
next
End Sub

ArrayFolder "1/2/3","/" 


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表