How to print a folder file list from Windows Explorer

It’s often useful to print the names of all the files in a folder, but this capability is not built into Windows by default.

Some third party file managers offer this function and there are some specialist utilities that will do the job as well.

But what most people don’t realize is that you can set up Windows to do the job without having to use other utilities. In this article I’ll show you how.

This technique makes use of the fact that good old DOS can print a folder file listing. All you do is use a DIR command and redirect the listing to your printer rather than your screen.

Don’t panic! I’m not going to ask you to run DOS from the command windows. There is an easier way.

All you need do is create a batch file using Notepad or other plain text editor and then configure Windows to run the batch file from Windows Explorer right click context menu.

Microsoft has a knowledge base article [1] explaining exactly how to create and use the batch file and full instructions on integrating this into Windows Explorer.

Unfortunately, the KB article leaves out one step in the instructions, so I’ve reproduced a modified version of the KB article below:

To add the print directory feature to Windows Explorer, follow these steps:
a) Open Notepad and then copy and paste the following text into Notepad:

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

b) Save the file as Prin.bat in the Windows directory, and then close Notepad.

c) Start Windows Explorer, click Tools, and then click Folder Options.

d) Click the File Types tab, and then click File Folder. d1)Click Advanced (this step added by Gizmo)

e) Click Edit, and then click New.

f) In the Action box, type Print Directory Listing.

g) In Application used to perform action, click Prin.bat, and then click OK.

h) Click OK, click Apply, and then click OK.

Now Open Windows Explorer, right-click the folder that you would like to print a directory listing of, and then click Print Directory Listing.

That’s it. The print directory feature has been permanently added to your copy of Windows


Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 10, Windows 8, Windows 7, Firefox, Internet Explorer, Google, etc. Join our 460,000 subscribers!

Enter your email above to receive messages about offerings by Penton, its brands, affiliates and/or third-party partners, consistent with Penton's Privacy Policy.
The Windows 7, Vol 3 (Excerpt)

Subscribe and get our monthly bonuses - free!

The Windows 7 Guide, Volume 3: Advanced maintenance and troubleshooting provides advanced tools for keeping Microsoft's premier operating system up and running smoothly. Get this excerpt and other 4 bonuses if you subscribe FREE now!

= Paid content

All Windows Secrets articles posted on 2008-07-17: