<%@ LANGUAGE = VBScript %> <% Option Explicit %> <% Dim SourceDir, fso, Indent, nl, SrDrLen nl=vbCrLf Indent=0 SourceDir=Server.MapPath("./") Set fso = CreateObject("Scripting.FileSystemObject") Set SourceDir = fso.GetFolder(SourceDir) SrDrLen=Len(SourceDir.Path) Response.Write ("" & SourceDir.Path & "") %> <% Response.Write ("

" & SourceDir.Path & "

") Wr0("
    ") Wr0("
      ") recur SourceDir Wr0("
    ") Wr0("
") Sub Recur(DDir)'======================================================= Dim SubDir, File Dim a(10000),b,n,m,p 'Read all file names into array. For Each File in DDir.Files n=n+1 a(n)=File.name Next 'Read all folder names into array For Each SubDir in DDir.SubFolders n=n+1 a(n)=SubDir.name & "!fdr" Next 'Sort names in array for p=2 to n m=p do while m>1 if ucase(a(m))") Recur Subdir 'Decrease Indent Wr0("") Indent=Indent-1 else Wr a(p),DDir end if Next End Sub'======================================================================= Sub Wr(Text, DDDr)'=============================================================== Response.Write("
  • " & Text & "

  • ") End Sub'======================================================================= Sub Wr1(Text)'=============================================================== Response.Write("
  • " & Text & "

  • ") End Sub'======================================================================= Sub Wr0(Text)'=============================================================== Response.Write(Text) End Sub'======================================================================= %>