<!DOCTYPE html>
<html>
  <head>
    <%@ Import Namespace="System.IO" %>
    <%@ Import Namespace="System.Text.RegularExpressions" %>
    <% Dim thisDirectory = Server.MapPath(".") %>
    <%
      Dim pathDir = Regex.Replace(Request.URL.AbsolutePath, "([^/]+)$", "")
    %>
    <title><%= Request.URL.Host %> - <%= pathDir %></title>
  </head>
  <body>
    <h1><%= Request.URL.Host %> - <%= pathDir %></h1>
    <hr/>
    <p style='white-space: nowrap; font-family: monospace'><%
      Dim dInfo = new DirectoryInfo(thisDirectory)
      Dim currentFile
      For Each currentFile In dInfo.getDirectories()  %>
        <%= currentFile.lastWriteTime %>
        &lt;dir&gt;
        <a href="<%= currentFile.Name %>"><%= currentFile.Name %></a><br/>
      <% Next
      For Each currentFile In dInfo.getFiles()  %>
        <%= currentFile.lastWriteTime %>
        &lt;file&gt;
        <a href="<%= currentFile.Name %>"><%= currentFile.Name %></a><br/>
      <% Next
    %></p>
  <hr/>
  </body>
</html>

