Create HTML table listing of Windows directories and files

Posted on October 4, 2008 at 5:34 am

Ever need to create an HTML file that lists all the files and folders in a particular Windows directory? Probably not something you’ll need to do very often, but it does come in handy every once in a while.

For example, if you want to quickly create a list of all files and folders inside of a Window directory and send it to someone in a nice easy to view format. Earlier I had written about a program called Karen’s Directory Printer, a free program that prints a list of all files and folders in a Windows directory. However, it only allows you to save the list as a text file.

DirHTML is a nifty program that pretty much does the same thing, generates a recursive list of files and folders, but outputs it as an HTML table with links! So you can actually open the file and click on any file to open the file in the web browser. Convenient for web developers possibly.

Here’s what a directory listing outputted in HTML looks like for a folder on my computer:

directory listing html table

Across the top are anchors, which are basically links to all of the folders inside the directory you specified. After that, all files within the root folder and within each folder under the root is listed along with basic file attributes. You can click on any of the files and it’ll try to open them in the browser window.

Once you download the program, simply run the dirhtml.exe file and you’ll get a configuration window like this:

create directory listing

The program is highly configurable, but you can also just choose the folder and click the Build button if you don’t want to do anything else. You can filter based on file extension (File Specification) or by file names.

Under Miscellaneous, you can specify the file attributes you want to include in the HTML output and also specify if you want to use fully qualified paths in the links. This is useful because if you want to be able to transfer the file to another computer, you can also copy the folder to the other computer under the same path, i.e. C:\My Documents\Test and be open to click on the files to open them.

print directory listing

Under Sorting, you can choose to sort the files by Filename, Size, Date, and Extension.

sort files 

You can also configure the program to build the directory listing recursively or not. You can choose whether you want all links in one HTML file or to create an HTML file for each separate folder.

html directory listing

Overall, it’s a useful program to quickly create HTML files for any folder branch in Windows. Enjoy!

» Filed Under Free Software Downloads

Related Posts

Comments

5 Responses to “Create HTML table listing of Windows directories and files”

  1. dan said on :

    Have you ever found a tool that might do this “on the fly”? The goal – to create a website where customers go to download files; each day the engineer might drop a new file into a windows directory and would not want to update the html each time to make it downloadable?


  2. dirhtml said on :

    For servers supporting php, instructions regarding regenerating index files upon access are provided in the Help->Notes file.


  3. IT said on :

    Ohh this is really great. I read through the help notes and was able to set it up so that the index file is regenerated every day. Now I don’t have to manually run the program to print out the list of files and directories. Great for my office.


  4. Shirley said on :

    Thanks for this info! I actually liked Karens Directory Printer better than the one you mentioned here. I always have to print a list of files and folders in a directory at work and I used to take screenshots, but this is way better. Thanks!


  5. Vince Jacobi said on :

    Awesome! However the link you provided no longer works. Here is a link that works as of today:

    http://dirhtml.home.comcast.net/~dirhtml/


Please post your comments/suggestions!