Print kataloginnhold   











How to add the print directory feature to Windows Explorer

Article ID : 272623
Last Review : September 29, 2004
Revision : 1.0


This article explains how to add the print directory feature, and how to enable printing of the directory listing from within Windows Explorer.


To add the print directory feature to Windows Explorer, follow these steps:
1. 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"
2. Save the file as Prin.bat in the Windows directory, and then close Notepad.
3. Start Windows Explorer, click Tools, and then click Folder Options.
4. Click the File Types tab, and then click File Folder.
5. Click Edit, and then click New.
6. In the Action box, type Print Directory Listing.
7. In Application used to perform action, click Prin.bat, and then click OK.
8. Click OK, click Apply, and then click OK.
9. Open Windows Explorer, right-click the folder that you would like to print a directory listing of, and then click Print Directory Listing.


 Note: Sometimes after you perform these steps, it will cause a problem when double-clicking a folder. To fix this, a quick Registry Edit may be required:

Key: Directory\Shell
Name: Default
Data Type: REG_SZ
Value: none

Tip: You can use other options for the dir command to customize what information is in the directory listing. Go to a command prompt and type "dir /?" without the quotes to see all of the options. In the example above, we used /o:gn to specify that we wanted the output to be sorted by grouping directory names at the top, and in alphabetical order by name.

Use caution and frequent backups when editing the Registry.

Startside ] Opp ] [Søk]

Copyright © 2002 Øyvind Haugland
Sist endret:  13 januar 2019

  Interested in this stuff? Please write to:

HTML Counter            stats counter