<%option explicit %> <!-- Created: 11/28/99 10:07:01 AM --> <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META NAME="GENERATOR" Content="ASP Express"> <META HTTP-EQUIV="Content-Type"CONTENT="text/html;CHARSET=iso-8859-1"> <TITLE>Filing System Scan</TITLE> </HEAD> <BODY> <% Dim Path, Fso Path = server.mappath(".") Response.Write("Using path: " & Path & "<p>") Dim fs, f, folder, fc, s Set Fso = CreateObject("Scripting.FileSystemObject") %><font size = 1 face="arial, helvetica, sans-serif"><% Call ScanFolders(Path) %></font><% Function ScanFolders(PathSpec) Dim fs, f, Folder, fc, s, File, FileList, FolderInfo, FileName, Name Response.Write(PathSpec & "<br>") %><BLOCKQUOTE><% Set FolderInfo = Fso.GetFolder(PathSpec) Set FileList = FolderInfo.Files For Each File in FileList Name = Cstr(File.Name) FileName = UCase(Name) If Instr(FileName,".HTM") OR Instr(UCase(FileName),".HTML") Then Response.Write("<Font color =Teal>" & Name & "<br></font>") ElseIf Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR Instr(FileName,".GIF") Then Response.Write("<Font color =Red>" & Name & "<br></font>") ElseIf Instr(FileName,".ASP") Then Response.Write("<Font color =Blue>" & Name & "<br></font>") ElseIf Instr(FileName,".TXT") Then Response.Write("<Font color =Green>" & Name & "<br></font>") ElseIf Instr(FileName,".ASA") Then Response.Write("<Font color =Silver>" & Name & "<br></font>") ElseIf Instr(FileName,".MAP") Then Response.Write("<Font color =Fuscia>" & Name & "<br></font>") ElseIf Instr(FileName,".CSS") Then Response.Write("<Font color =Olive>" & Name & "<br></font>") Else Response.Write("<Font color =Maroon>" & Name & "<br></font>") End If Next %></BLOCKQUOTE><% Set f = Fso.GetFolder(PathSpec) Set fc = f.SubFolders For Each Folder in fc %><BLOCKQUOTE><% Call ScanFolders(PathSpec & "\" & Folder.Name) %></BLOCKQUOTE><% Next End Function %> </BODY> </HTML>