Pin Me

Quick “Print Directory” in Vista

written by: Lamar Stonecypher•edited by: Rebecca Scudder•updated: 10/15/2009

Have you ever needed a fast way to print a list of files in a particular folder? Windows Explorer has no easy method for doing this, but if you follow the steps in this simple guide, you can add "Print Directory Listing" to the right-click menu for folders in Windows Explorer.

  • slide 1 of 11

    This article addresses adding “Print Directory Listing” to the right-click contextual menu of folders in Windows Explorer in Windows Vista. Information for this tip was obtained from Microsoft Knowledgebase articles 321379 and 322756. If you are using Windows XP and want to add this same functionality, please see this article instead.

    Let's get started.

  • slide 2 of 11

    Part One: Create the Batch File

    1. Click Start, All Programs, Accessories

    2. Right-click Notepad and select “Run as Administrator”

    3. If User Access Control is engaged, click Continue.

    4. Paste in the following text:

    @echo off

    dir %1 /-p /o:gn > "%temp%\Listing"

    start /w notepad /p "%temp%\Listing"

    del "%temp%\Listing"


    5. Click File, Save As, and enter the following text in the Save As field:


    6. Click Save, and then exit Notepad.

  • slide 3 of 11


  • slide 4 of 11

    Part Two: Set a Restore Point

    As a precaution, since we’ll be editing the Windows Registry, let’s back up the current configuration of the computer by setting a Restore Point. This is a simple operation.

    1. Press the Windows key and type in “systempropertiesprotection”

    2. If User Access Control is engaged, click Continue.

    3. Click Create.

    4. Enter a meaningful name for your restore point.

    5. Click Create again and watch as it creates the restore point.

    6. Click OK to close the System Properties dialog.

  • slide 5 of 11

    Part Three: Edit the Registry

    Now we're ready to make the changes in the Registry to add our new command to the folder right-click menu.

    1. Start the Registry editor by clicking Start, Run and entering “regedit”

    2. Navigate to HKEY_CLASSES_ROOT\Directory\shell

    3. Right-click “shell” and select New, then Key.

    4. Type in

    Print Directory Listing

    and press Enter.

  • slide 6 of 11


  • slide 7 of 11

    5. Right-click Print Directory Listing and select New, then Key

    6. Type in


    and press Enter.

    7. With the high-light on Command, double-click Default on the right side.

  • slide 8 of 11

    8. In the “Value” data field, enter


    9. Click OK.

    10. Exit the Registry Editor

  • slide 9 of 11


  • slide 10 of 11

    And that completes the process. Try right-clicking a folder in Windows Explorer, and you should have “Print Directory Listing” in the menu. Select that and a command-prompt box should pop up momentarily followed by Vista's print spooler dialog.

  • slide 11 of 11

    Further Reading

    How to Surf Anonymously - Get Lost in the Crowd with TOR - When you're surfing the web, every data packet your PC sends out can tell the wrong people what you're doing and with whom you're communicating online. One method of anonymity is getting "lost in the crowd." Here we'll show you how.

    The Best Free Streaming Music Discovery Websites - and Why We Should be Listening Now While We Still Can - Are you still listening to the same music that you did when you were a teenager or young adult? If you’ve bought the same Eagles album on 8-track tape, cassette tape, CD, and from iTunes, it's time to give some new music a try. This article is for you.

    How to Speed Up Vista's Boot Time - Can you bake bread in the time it takes for your Vista PC to start up? Or does it seem that way? Fortunately, there are some relatively easy steps to take to speed up Vista's boot time. We describe four of them here.

    How to Make a Bootable Disc in Vista - Need a backup method to start a Vista PC? Creating a bootable disc in Vista is not as easy as in previous versions of Windows, but it can be done. This article tells you how.