Have you ever needed to print a list of all the files in a directory? Sure, we all have. But unless you’re a DOS kind of person it’s a real pain in Windows.

Well, now with the new Print Directory Listing feature you can!

Here’s a screenshot of the context menu in Windows Explorer with the Print Directory Listing feature installed:

Running this opens Notepad and prints all of the files in the folder you selected.

Instructions

  1. Save PrintDirectory.zip to your computer.
    Download the ZIP file here: PrintDirectory
  2. Open PrintDirectory.zip and save PrintDirectory.reg and Printdir.bat to C:\Windows
    IMPORTANT!
    The Printdir.bat must be saved to C:\Windows or this won’t work
  3. Open Windows Explorer and navigate to C:\Windows
  4. Double-click PrintDirectory.reg
  5. Select OK or Yes in the warning dialogs

That’s it! To test, right-click any directory in Windows Explorer and select Print Directory Listing.

Tips

I’ve configured this to only show files and not sub-folders. You can adjust Printdir.bat to meet your needs by altering this line:

dir %1 /-p /b /a-d-s-h /o:gn > “%temp%\Dir Listing”

Below is a description of the switches you might care about:

  • /b – Only shows the filename. Remove this to get a tab-delimited format including date and filesize
  • /a – The /a switch configures the types of files to be displayed
    • -d – Hides directories. Remove this switch to display directories.
    • -s – Hides system files.
    • -h – Hides hidden files. Removing this switch will display temp files from Word.
  • /o – Sort order
    • g – Groups directories first. Not needed with /a-d turned on, but left in just in case.
    • n – Sorts by name

One other switch that some users may wish to add is /s which will include all sub-folders.

To learn more about switches that can be added open a command prompt and run the command dir /?.

Thanks to my wife who found the original version of this batch script and registry key.

Hope you find this useful,
Mike

Download:
PrintDirectory

Leave a Reply