Whether you need to do so for your website or yourself, there is quite often a need to create a listing for a particular directory, set of directories or a whole drive. There are very simple ways of doing this but the end results are not exactly pleasing to look at with a simple text based output. A much nicer and more functional way is to create these structures in an HTML directory format. This is an especially ideal scenario if you are using your system as a server or something like a sitemap or index for a website is needed where local directories can be indexed and then uploaded.
Even if you have no intention of using HTML directory listings for online purposes, creating listings for cataloguing file collections and folders on your hard drives or CD’s and DVD’s still produces something that is much easier to read and navigate around than a standard text file alone. A program called Dir2HTML from Arclab is a freeware tool for Windows that aims to make it easy to convert a standard directory structure into an HTML index file.
The program has a number of useful options to aid in the creation and customization of the HTML index. Dir2HTML supports recursive folder indexing, selecting a file mask to filter in or out filetypes, create a sub-section for each subfolder and excluding hidden files and folders. Tailoring the output visually can be handled by adding a customized title, altering the font sizes and colours and resizing different areas of the output.
The program is a small 1.2MB download and is pretty straight forward to use. There is not a portable version available, but this can be easily worked around by simply copying the Dir2HTML folder from ‘Program Files’ and then uninstalling if you don’t want to keep the program installed.

An index can simply be created by clicking the ‘Select folder’ icon, picking the root folder to index, clicking the ‘Select Output’ button and choosing the location where to save the created .htm file. Then either press the ‘Start’ button at the top to create the file, or click ‘Start and Open Output file’ at the bottom to also view the htm file in your browser afterwards. Depending on the amount of data to process, this can take from a couple of seconds to a few minutes for a whole drive.

Options such as adding a back-link to add a link to the top-level section, or creating hyperlinks from files are available should you need a bit more flexibility for the index. If you use ‘Link files’, the ‘Link-Prefix’ box will need to be altered from the default ‘./’ if the index file will not be located in the root of the input folder. See the Online Help for a better understanding.
The colour, type and size of the fonts along with the background may need a bit experimenting with to get the desired results, but it shouldn’t take too long for the way it looks and displays the index is to your liking.
Compatible with Windows XP, Vista and 7