<% dim x, y dim strDir dim strRoot dim strTopRoot dim strRootFolder dim varBuffer dim strPath dim strScript dim f, f1, fc, fo dim objFS set objFS = CreateObject("Scripting.FileSystemObject") strRoot = replace(Request.ServerVariables("PATH_TRANSLATED"), "\", "/") varBuffer = split(strRoot, "/") strScript = varBuffer(ubound(varBuffer)) strRootFolder = varBuffer(ubound(varBuffer)-1) strRoot = replace(strRoot, "/" & strScript, "") strTopRoot = replace(strRoot, "/" & strRootFolder, "") strDir = trim(request.querystring("dir")) if strDir<>"" then varBuffer = split(strRootFolder & "/" & strDir, "/") else varBuffer = split(strRootFolder, "/") end if response.write "
" for x = 0 to ubound(varBuffer) if x<>0 then if left(strPath,1)<>"/" and strPath<>"" then strPath = strPath & "/" end if strPath = strPath & varBuffer(x) end if response.write "" for y = 0 to x response.write "" next response.write "" response.write "
" & varBuffer(x) & "
" next Set f = objFS.GetFolder(strRoot & "/" & strPath) Set fo = f.SubFolders For Each f1 in fo response.write "" for y = 0 to x response.write "" next response.write "" _ & "
" & f1.name & "
" Next Set f = objFS.GetFolder(strRoot & "/" & strPath) Set fo = f.SubFolders Set fc = f.Files For Each f1 in fc if x<>0 and f1.name<>strScript then if lcase(right(f1.name,3))<>"asp" and lcase(right(f1.name,3))<>"inc" then response.write "" for y = 0 to x response.write "" next response.write "
" & f1.name & "
" end if end if Next response.write "
" %>