Convert Windows Folders to HTML Lists

Ever need to create an HTML file list all files and folders in a specific Windows folder? Probably not something you need to do often, but it helps once in a while.

For example, if you want to quickly create a list of all the files and folders inside a Window folder and send it to someone in a nice easy to view format. Earlier, I wrote about how you can use the command line or third-party applications to print a list of all files and folders in a Windows folder, however, those options only output text. copy, Word or Excel.


DirHTML is a nifty program with similar functionality, which generates a recursive list of files and directories, but outputs it as an HTML table with links! Therefore, you can actually click on any file to open it in a web browser or with any of the default apps for that file type. This can be very convenient for web developers working on a local website.

Here’s what the HTML output folder list looks like to the downloads folder on my computer. You’ll notice the output is a bit plain and old-fashioned. This is because the program is old and therefore the website it generates looks quite old. If you want a nicer output for directory listing, check out the second program called Snap2HTML that I mention below.


At the top are the anchors, which are links to all the folders inside the folder you specified. Then all files in the root directory and in each directory under the root directory are listed along with their basic file attributes. You can click on any of the files to open them.

After you download the program, just run dirhtml.exe and you will get a configuration window like this:

create directory listing

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

Below Other terms, you can specify the file attributes that you want to include in the HTML output and specify whether you want to use fully qualified paths in the links. This is useful if you want to be able to transfer files/folders to another computer. You can copy the folder to another computer by the same path i.e. C:\My Documents\Test and still be able to click on the files in the HTML list to open them.

print directory listing

Below Sortyou can choose to sort files by Filename, Size, Date and Extension.

sort files

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

html directory list

Overall, it’s a useful program to quickly create HTML web pages for any directory branch in Windows.


Second program, Snap2HTML, not many options, but the output looks better. Here is the HTML output for the same download folder on my computer:

output snap2html

The program has a very simple interface and only a few options. To run the program, simply double-click the Snap2HTML.exe file. Like DirHTML, this program does not require installation.

snap2html guide

First, you select the root directory where you want to start the directory listing. There are two options to include system files or hide if you want. You can change the title of the HTML page and you can check Allow Below Link files if you want every file to be a clickable link.

You can check Open in browser when ready and then click Create a snapshot to generate HTML directory listings. You will first be prompted to save the HTML file and then it will open in your default web browser.

So you have two programs that get the job done. Each has its own pluses and minuses, so feel free to choose the one that better suits your needs. If you have any questions, feel free to post a comment. Interesting!

Leave a Reply

Your email address will not be published. Required fields are marked *