%
'==================================================================================
'help_pms폴더에 있는 모든 그림파일을 읽어옴
'----------------------------------------------------------------------------------
Dim tmp_folder(50)
function getFolder(sPath, iDepth, bSonFdr, bShowFile)
Dim fso, objFolder
Dim folders, folder
Dim files, file
Dim sSpace
sSpace = ""
for i=0 to iDepth
sSpace = sSpace & ":tab:"
next
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(sPath)
set fso = nothing
set folders = objFolder.SubFolders
Set files = objFolder.Files
set objFolder = nothing
For Each folder in folders
'response.write sSpace& "[폴]" &folder.name & "
"& vbCRLF
'해당 폴더의 파일
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(sPath & "\" & folder.name)
set fso = nothing
Set hfiles = objFolder.Files
tmp_folder(0) = sPath & folder.name
i = 1
For Each file in hfiles
'response.write sSpace& "[파]" &file.name & "
"& vbCRLF
tmp_folder(i) = file.name
i = i + 1
Next
'++ 하위폴더
if bSonFdr then
call getFolder(sPath&"\"&folder.name, iDepth+1, bSonFdr, bShowFile)
end if
Next
'++ 파일도 보여준다면
if bShowFile then
i = 1
For Each file in files
'response.write sSpace& "[파]" &file.name & "
"& vbCRLF
'gif 파일이 아닌 것은 저장하지 않도록 함
if right(file.name, 3) = "gif" then
tmp_folder(i) = file.name
i = i + 1
end if
Next
end if
end function
RootDir = Server.MapPath(".") & "\help\" 'image파일이 존재하는 폴더
tmp_f = getFolder(RootDir, 0, false, true)
tmp = 0
for i = 1 to ubound(tmp_folder)
if tmp_folder(i) <> "" then
tmp_folder(0) = replace(tmp_folder(0),"\","/")
'Response.Write "" & tmp_folder(j,i) & "
"
'Response.Write tmp_folder(i) & "
"
tmp = tmp + 1
end if
next
if tmp = 0 then
Response.Write "