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", "/"
' Generate multilevel Catalogs
' Directory-building program, if there are multilevel directories, the first-level creation
Function Createdir (ByVal localpath)
On Error Resume Next
LocalPath = replace ( LocalPath, "", "/")
Set fileobject = Server.CreateObject ("Scripting.FileSystemObject")
Patharr = Split ( LocalPath, "/")
Path_level = UBound (Patharr)
For i = 0 to Path_level
if I=0 then Pathtmp=patharr (0) & "/" E LSE PATHTMP = pathtmp & Patharr (i) & "/"
CPath = Left (Pathtmp,len (pathtmp)-1)
If not Fileobject.folderexis TS (cpath) then Fileobject.createfolder cpath
Next
Set fileobject = Nothing
If err.number <> 0 then
C Reatedir = False
Err.Clear
Else
Createdir = True
End If
End Function%>