Monday, February 9, 2015

[Windows]: Create HTML Table Listing of Windows Directories and Files

Create HTML Table Listing of Windows Directories and Files


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. 

- By Ravindra Yadav

Enjoy!

No comments:

Post a Comment