hello, the asp file is on lets say server a0001 but the directoy that i want to display is on server a0002 now, as it is i can get anything under like a0001 to display just by the normal /folder but i tried to get it to display from a0002 by this "\\a0002\folder but that didnt work so i dun kno what else i can try or do
here is the code im using to display right now
Code:<%@ LANGUAGE="VBScript" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>ASP Directory Listing</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="/common/default.css" /> </head> <body> <div id="demoBox"> <h3>ASP Directory Listing</h3> <p>Three separate directories from the web server root are displayed below ("asp", "dhtml" and "js"), showing all subdirectories and files. Additionally, each file is displayed as a link.</p> </div> <!-- List these three folders. --> <ul> <% ListFolderContents(Server.MapPath("/tools")) %> <% ListFolderContents(Server.MapPath("/visios")) %> <% ListFolderContents(Server.MapPath("/js")) %> </ul> </body> </html> <% sub ListFolderContents(path) dim fs, folder, file, item, url set fs = CreateObject("Scripting.FileSystemObject") set folder = fs.GetFolder(path) Response.Write("<li><b>" & folder.Name & "</b> - " _ & folder.Files.Count & " files, ") if folder.SubFolders.Count > 0 then Response.Write(folder.SubFolders.Count & " directories, ") end if Response.Write(Round(folder.Size / 1024) & " KB total." _ & vbCrLf) Response.Write("<ul>" & vbCrLf) for each item in folder.SubFolders ListFolderContents(item.Path) next for each item in folder.Files url = MapURL(item.path) Response.Write("<li><a href=""" & url & """>" & item.Name & "</a> - " _ & item.Size & " bytes, " _ & "last modified on " & item.DateLastModified & "." _ & "</li>" & vbCrLf) next Response.Write("</ul>" & vbCrLf) Response.Write("</li>" & vbCrLf) end sub function MapURL(path) dim rootPath, url rootPath = Server.MapPath("/") url = Right(path, Len(path) - Len(rootPath)) MapURL = Replace(url, "\", "/") end function %>





Bookmarks