Introduction
Many people who are customers to web-hosting companies employing IIS as their webserver software often find themselves needing to display the contents of directories on their website.
Ordinarily this isn't too much of a problem, as a simple web-page can be manually written with a list of all files uploaded, however, when one needs to show a directory who's contents are often changing or contains a large amount of files, writing out each file by hand would be impractical and time consuming.
Many webservers often have built-in scripts to show the contents of directories, however equally many webhosts disable this useful feature, citing security concerns.
Fortunatly, a solution is at hand: these free scripts show the contents of the directory they are placed in and their appearance can be customized to suit your site's colour scheme with the use of CSS. And of course, they're all 100% Standards Compliant. (Conforming to the W3C 's XHTML 1.1 and CSS2. )
Versions & Requirements
For ASP3.0
The script requires the server to be running ASP-compatible webserver software, and have FileSystemObject enabled (however, only read access is required), this should work on the majority of ASP/IIS webhosts.
Requirements
- ASP Compatible webserver software (inc IIS)
- Scripting.FileSystemObject component (enabled by default, but check with your host)
- COM Read access to folder (enabled by default, but check with your host)
For ASP.Net
Whilst doing pretty much the same job as above, the ASP.Net version is completely rewritten, and is up to 20x faster
Requirements
- .Net (DotNet) Framework 1.1
- System.IO Access enabled (check with your host, under the increased security options for ASP.Net, access to this DotNet namespace is often disabled
Note that these scripts will work regardless whether Contents Listing is enabled or not
Instructions
- Download an appropriate version
- Extract all the files using your favorite Zip extractor
For the "lite" scripts:
- Upload
lite.asporlite.aspxto the folder you wish to display the contents of - Rename to
index.asp(for ASP3) ordefault.aspx(ASP.Net) for the directory contents to be displayed when a request is made for that directory - Note that only the ASP3 version doesn't include itself in the directory listings
- Upload
For the "list" scripts:
- Extract the Icons.zip and upload the icons to an arbitrary (but publically accessable)
folder, eg
\inetpub\wwwroot\fso - For the ASP3 version:
Open
list.aspin a text editor and go to line #24 and enter the absolute path to the icons folder, retaining the trailing slash and quotes - For the ASP.Net version:
Open
list.aspxin a text editor and go to line #6 and enter the absolute path to the icons folder, retaining the trailing slash and quotes - Upload
list.asporlist.aspxto the folder you wish to display the contents of - Rename to
index.asp(for ASP3) ordefault.aspx(ASP.Net) for the directory contents to be displayed when a request is made for that directory - Note that only the ASP3 version doesn't include itself in the directory listings
- Extract the Icons.zip and upload the icons to an arbitrary (but publically accessable)
folder, eg
Download
ASP3.0
Contents:list.asp- Scriptlite.asp- Script that doesn't require iconsicons.zip- File type iconsinstructions.txt- Instructions for future reference
ASP.Net
Contents:list.aspx- Scriptlite.aspx- Script that doesn't require iconsicons.zip- File type iconsinstructions.txt- Instructions for future reference
Contact
As a first port-of call, contact your host first, if they are unable to resolve the problem, feel free to contact W3bbo at w3bdevil@NOSPAMw3bdevil.com , just remember to remove the spam-blocks