<% Dim strPathInfo, strPhysicalPath strPathInfo = Request.ServerVariables("PATH_INFO") strPhysicalPath = Server.MapPath(strPathInfo) Dim objFSO, objFile, objFileItem, objFolder, objFolderContents Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(strPhysicalPath) Set objFolder = objFile.ParentFolder Set objFolderContents = objFolder.Files 'Get prameters to trim file name from strPathInfo Dim PathLen, NameStart, Fname PathLen = Len(strPathInfo) 'load the numer of characters to remove Fname = "default.asp" NameStart = Len(Fname) %>

Directory Listing in: <% =Mid(strPathInfo, 1,PathLen-NameStart)%>


<% For Each objFileItem in objFolderContents 'Omit the display of this asp file which is also in the directory If StrComp(LCase(Fname),LCase(objFileItem.Name)) Then %> <% End If Next %>
File Name Type File Size Last Modified
<%= objFileItem.Name %> <%= objFileItem.type %> <%= objFileItem.size %> <%= objFileItem.DateLastModified %>