asp教程生成目錄與無限生成多級目錄創建
這裡提供二款asp目錄生成函數
sub efolder(foldername)
dim fso
set fso=server
if fso
set fso=nothing
exit sub
else
fso
end if
set fso=nothing
end sub
===================================================================
sub arrayfolder(path
dim arraypath
arraypath = split(path
newpath=""
for each epath in arraypath
newpath=newpath&epath&"/"
newpath = replace(newpath
efolder newpath
next
end sub
arrayfolder "
生成多級目錄
function createdir(byval localpath)
on error resume next
localpath = replace(localpath
set fileobject = server
patharr = split(localpath
path_level = ubound(patharr)
for i =
if i=
cpath = left(pathtmp
if not fileobject
next
set fileobject = nothing
if err
createdir = false
err
else
createdir = true
end if
end function%>
From:http://tw.wingwit.com/Article/program/net/201311/14291.html