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"
exit

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

[1] http://support.microsoft.com/?kbid=272623



Subscribe to our Windows Secrets Newsletter - It's Free!

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

PC Drive Maintenance (Excerpt)

Subscribe and get our monthly bonuses - free!

Your hard drives store photos, books, music and film libraries, letters, financial documents and so on. This ebook is aimed at helping you understand your hard drives, expand their capacities and length of life, and recover what you can from them when they fail. We're offering you a FREE Excerpt! Get this excerpt and other 4 bonuses if you subscribe FREE now!

= Paid content

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