%@ Language=VBScript%>
<%
'List the contents of the current
'***** Enter a TITLE for this web page in the line below ***
strTitle = "Photos"
'***** Enter a MAIN HEADING for this web page in the line below *****
strHeading = "Photos"
'You don't need to change anything below this line
'********************************************************************
%>
<%response.write ("" & strTitle & "")%>
<%
response.write ("" & strHeading & "
")
set FileSysObj=CreateObject("Scripting.FileSystemObject")
strFileAndPath = request.servervariables("SCRIPT_NAME")
strPathOnly = Mid(strFileAndPath,1 ,InStrRev(strFileAndPath, "/"))
strFullPath = server.mappath(strPathOnly)
set fldr=FileSysObj.GetFolder(strFullPath)
response.write("Folders list
")
set FolderList = fldr.SubFolders
For Each FolderIndex in FolderList
Response.Write("" & FolderIndex.name & "
")
Next
response.write("Images
")
set FileList = fldr.Files
For Each FileIndex in FileList
'This bit excludes this page (and other asp files) from the list of links
if Lcase(right(FileIndex.Name, 4)) <> ".asp" then
Response.Write("" & FileIndex.name & "
")
end if
Next
%>