Top Nav

How-To Add Print Directory To The Windows 7 Context Menu [groovyTips]

Groovy Windows 7 How-To, Tricks, Tips, News, and DownloadsA week ago we covered how to create a Directory Contents List for folders in Windows using the command prompt.  As one of our groovy readers suggested, you can also add this to the context menu as a shortcut command.  Since it was such a good idea, here is the guide (Thanks, Ted!)

Using this small windows tweak, you can instantly Click and Print content lists of any folder in Windows 7 or Vista.

 

How To Print An Automatically Generated Directory List

 

1. Click the Windows Start Menu Orb and Type notepad into the Start Menu.  Next Press Enter on your keyboard or Click the Notepad programs link.

open the notepad in windows 7

 

2. Copy and Paste the following code into the blank Notepad:

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

paste the print directory code into notepad

 

3. Click the File menu and Select Save As

save your windows 7 notepad file

 

4. In the File Name text box Paste the following:

%windir%Printdir.bat

Then Click Save.*

*This typically will save the file to the location C:Windows with the name Printdir.bat

save the file as printdir.bat in your windows folder

 

Now it’s time to create the registry key, so the command appears in the right-click context menu.

If you want to skip the rest of these steps, you can Download the pre-made registry fix from the link at the bottom of this article.

 

5. Click the Windows Start Menu Orb, Type regedit in the search box, and then Press Enter.

open regedit in windows 7

 

6. Navigate through the left pane of the registry to the following key:

HKEY_CLASSES_ROOTDirectoryshell

Once there, Right-Click the shell key (looks like a folder) and then Select New > Key.

under HKEY_CLASSES_ROOTDirectoryshell create a new key

 

7. The new key should appear underneath shellRename the new key to Print Directory Listing.

name the new key Print Directory Listing

 

The next two steps might feel a little repetitive, but the Windows registry is a pretty boring place.

 

8. Right-Click Print Directory Listing and Select New > Key.

under HKEY_CLASSES_ROOTDirectoryshellPrint Directory Listing make a new key

 

9. The new key should show up under Print Directory Listing. Rename the new key to command.

name the new key command

Here we break the cycle and edit the default file that usually never gets touched.

 

10. Under the command key that you just created, Right-Click the default entry and Select Modify.*

*You can also just Double-Click the (Default) entry to modify it.

under command, modify the default file

 

11. Type the following into the Value data box:

Printdir.bat %1

Once done, Click OK.

assign the value as Printdir.bat %1

 

Done! Now here is the result.

 

Now when you Right-Click nearly any folder there will be a new option in the menu called Print Directory Listing.  Take a note that this button is linked right to your default Windows Printer.

print directory listin from the context menu

 

When you Click the Print Directory Listing option, it will send an automatically generated text list of the folders contents straight to the default printer.

a printed directory listing of windows 7 folder contents

Download the Print Directory Listing registry fix

More Reading:

,

5 Responses to How-To Add Print Directory To The Windows 7 Context Menu [groovyTips]

  1. Ron B May 19, 2011 at 11:52 am #

    Great idea to add to context menu but unable to get “fix” using this URL
    http://drop.io/groovedexter/asset/enableprintdirectorylisting-reg

    • MrGroove May 19, 2011 at 11:54 am #

      Ouch….. Drop.IO died a few months back after Facebook bought them. Dex, do you have a good URL with the fix?

  2. Jan Zumwalt September 26, 2012 at 8:39 pm #

    Your “Download the Print Directory Listing registry fix” link is broken 🙁

  3. Tom Margrave June 23, 2016 at 12:11 pm #

    I use this all the time but I have added one line to the batch file. I have added the following:

    type “%temp%Listing” | clip

    Which this will type the contents of the listing file and put it into the clipboard so I do not have go to the notepad for select all and copy.

    Here is my recommend change.

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

  4. KenF November 28, 2016 at 7:25 pm #

    Great Idea, BUT on my Win 7 Pro, it ALWAYS prints a directory of the %windir% directory!!!

Leave a Reply