时时商务社区

标题: asp按照指定目录使用fso创建文件夹代码 [打印本页]

作者: 福多多1989    时间: 2018-2-18 04:48

                   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","/"





欢迎光临 时时商务社区 (http://bbs.4435.cn/) Powered by Discuz! X3.2