%
Function PrintDir(ident, dir)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(dir)
Set fc = f.Files
idnt = ""
for i=1 to ident
idnt = idnt & "  "
Next
pf = fso.GetParentFolderName(dir)
sn = Request.ServerVariables("SCRIPT_NAME")
Response.Write idnt & " ..
"
Set dc = f.SubFolders
For Each f1 in dc
Response.Write "DIR"
fn = dir & f1.name
Response.Write idnt & "" & f1.name & "
"
Next
idnt = idnt & "        "
For Each f1 in fc
Response.Write idnt & f1.name & "
"
Next
end function
path = Request.QueryString("path")
PrintDir 1, path
%>