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

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

Note that these scripts will work regardless whether Contents Listing is enabled or not

Instructions

  1. Download an appropriate version
  2. Extract all the files using your favorite Zip extractor
  3. For the "lite" scripts:

    1. Upload lite.asp or lite.aspx to the folder you wish to display the contents of
    2. Rename to index.asp (for ASP3) or default.aspx (ASP.Net) for the directory contents to be displayed when a request is made for that directory
    3. Note that only the ASP3 version doesn't include itself in the directory listings
  4. For the "list" scripts:

    1. Extract the Icons.zip and upload the icons to an arbitrary (but publically accessable) folder, eg \inetpub\wwwroot\fso
    2. For the ASP3 version: Open list.asp in a text editor and go to line #24 and enter the absolute path to the icons folder, retaining the trailing slash and quotes
    3. For the ASP.Net version: Open list.aspx in a text editor and go to line #6 and enter the absolute path to the icons folder, retaining the trailing slash and quotes
    4. Upload list.asp or list.aspx to the folder you wish to display the contents of
    5. Rename to index.asp (for ASP3) or default.aspx (ASP.Net) for the directory contents to be displayed when a request is made for that directory
    6. Note that only the ASP3 version doesn't include itself in the directory listings

Download

ASP3.0

Contents: Download (15.5 kb)

ASP.Net

Contents: Download (15.7 kb)

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