<% 'By Aloxy, E-mail: szyjj @ Hotmail.com, OICQ: 33162229SUB LISTFOLDERCONTENTS (PATH)
DIM FS, FOLDER, FILE, ITEM, URL
SET FS = CreateObject ("scripting.filesystemObject") SET Folder = fs.getFolder (PATH)
'Display The Target Folder and Info.
Response.write ("
Response.write ("
'Display a list of sub belly.
For each item in folder.subfolders listFolderContents (item.path) Next
'Display a list of files.
For each item in folder.files url = mapurl (item.path) Response.write ("
Response.write (" UL>" & VBCRLF)
Response.write (" li>" & vbrlf)
End Sub
Function Mapurl (PATH)
Dim rootpath, URL
'Convert a Physical File path to a url for hypertext links.
Rootpath = Server.mappath ("/") URL = Right (path, len (path) - Len (rootpath) mapURL = Replace (URL, "/", "/")
End function%>