Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display List of files in web page 1

Status
Not open for further replies.

tapicomms

Technical User
Mar 18, 2005
9
GB
G'Day

Im new to this web development bit, and am just getting started.

I have an internal site that I need to build that will display our service manuals that reside on a file server with file type of pdf.

All of these files reside in a folder that is the name of the manufacturer ie: ford.

Currently I have a bunch of links on a single html file pointing to the files.

I would like to have a page that will list through the directoris, and popluate a list box with the manufacturers name(folder name). Then have another box that you can select the service manuals (Focus, Galaxy, Ranger). From there I would like that selection to open the file within a frame on the page.

Ideally I would also like a way to have some information boxes when you select a manufacturer such as serviceing details specific to that manufacturer. If I change a file I I would like it to display the "last updated date" somewheer when you select the specific file as well .


Hope someone can help
 
there was a post very similar to this about a week ago, have a look back through, you should find it, someone waanted to have a link for each file in a folder and display the contents of a text file as well
 
This is really easy to do with ASP and vbscript. Here is some sample code I wrote to do just htis a few years back. This will create a web page with hyperlinks to all the files in a folder called download2.

Code:
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="The Spider's Parlor">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Customer Support Download Page</TITLE>
</HEAD>
<BODY>
<!--[green]
'=====================================
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' COPYRIGHT (c) 2004 All Rights Reserved
' DATE  : 3/16/2004
'
'    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED To
'    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'    PARTICULAR PURPOSE.
'
'    IN NO EVENT SHALL THE SPIDER'S PARLOR AND/OR ITS RESPECTIVE SUPPLIERS 
'    BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
'    DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
'    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
'    ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
'    OF THIS CODE OR INFORMATION.
'=====================================[/green]
-->

<table height=100%>
<tr>
   <td bgcolor="84A5C6" width=17% height=100%></td>
   <td valign=top>
       <% set directory=server.createobject("scripting.filesystemobject")
		set allfiles=directory.getfolder(server.mappath("/download2/"))
	' Lists all the files found in the directory
	For each directoryfile in allFiles.files 
	%>
	<a href=/download2/<%
	' Write out the name of the document
	response.write server.urlencode(directoryfile.name) %>><% response.write directoryfile.name %></a><br>
	<% 
	' End for next loop to list documents
	Next 
	%> 
    </td>
    <td bgcolor="84A5C6" width=17% height=100%></td>
</tr>
</table>
</BODY>
</HTML>

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top