I have had hard times trying to print a directory structure till I was able to learn how to do it. For those of you who are finding it difficult to print a directory structure you will be amazed at how easy it is. I know some might not know what a directory structure is and I would like you to know that it is a list of all subdirectories, files in a folder and directories in a diagram listed in a hierarchal order. You might hear people referring it to as a directory tree sometimes. I found printing a directory structure to be quite helpful especially when am working with files that are complex or trying to get my hard drive organized. I will guide you through the steps that I followed so that you too can be able to print your own directory structure.

Here are the steps…


Creating a batch file

To be able to create a batch file, you first click on the start button then opt for the option to run and type notepad in the text box to open the application note pad. You should avoid typing any quotation marks in the text box. When the note pad application opens you should then type

@echo off
dir %1 /-p /o:gn > “%temp%\Listing”
start /w notepad /p “%temp%\Listing”
del “%temp%\Listing”
exit

After typing the above in the notepad you should then exit the application and save any changes when prompted to. You should save the file as “%windir%\Printdir.bat”

To the registry add the print command

This is done by clicking on the start button and choosing run. In the text box you should type regedit which will open the editor for registries. You should then click twice on the folder of the registry key HKEY_CLASSES_ROOT\Directory\shell.” On the registry editor you should click on edit and choose from the popup menus new and key. You should then enter the text print directory listing in the text box. Click twice on the new folder that has been created. It will have the name print directory listing. You should then click on edit and once again choose new and key from the menus that pop up. You should then type any name in the text box that appears on the editor for registries. Once that is done click twice on the entry that you have just made and enter the text “Printdir.bat %1 in the value date text box. You can the close the editor registry after clicking ok.

Getting the new command into use

You start by clicking on the start button and choose the option to explore. On the directory which you which you wish to have a directory structure printed, you should right click. You then choose the option to print directory listing on the menu that pops up and then choose to print.

I followed this steps and I was able to print my own directory structure. The process was not all that difficult so you do not have to be a computer wizard to get this done. I am hoping that you will have an easy time.