How to Print Content of Directory from Context Menu in Windows

If you are in need of printing out the content of your folders, you don't have to use freeware program of sort to help you do that.

Wouldn’t it be great if you could right-click a folder and choose “Print Directory” instead?

With a small executable batch-file, and a little registry tweak you can create a Context-Menu

You can add a Print Directory context menu, that will print the content of any folder. Simply by right clicking the folder name, choose: Print Directory.

How to Print Content of Directory from Context Menu in Windows U3D8kvk

Here's how to do it.


1. Press Windows + R keys to open Run box, type notepad.exe, and click OK button.

How to Print Content of Directory from Context Menu in Windows Xgjooha

2. Copy and paste the following text into Notepad:

Code:

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


3. Click File from menu bar, and click Save As option.
   
4. In the Save As dialog box, type: %windir%\Printdir.bat

   (This will save the file in your Windows Directory).
   
5. Click Save button.

Note: You may need to launch the Notepad as a Administrator to save the Printdir.bat batch file into Windows directory.


In Windows XP, we now need to create a new action for file folders.

1. Open Start Menu > Control Panel > Folder Options.

2. On the File Types tab, click File Folder.

How to Print Content of Directory from Context Menu in Windows XcL0tgg

3. Click Advanced, and then New.

4. In the Action box, type: Print Directory.

5. In the Application used to perform action box, type: printdir.bat.

6. Click OK button.

7. Click OK button two more times, and then click Close.

At this point you may Right-Click a folder and see if you are able to print out the contents. If successful, you’re done. If not, then you will need to edit the Registry.

1. Launch the Registry Editor by pressing Windows + R keys to open Run box, type regedit.exe, and click OK button.
   
2. Locate the Default value under the following registry subkey:
   

Code:

HKEY_CLASSES_ROOT\Directory\shell

   
3. Click the Default value and on the Edit menu, click Modify.
   
4. In the Value data box, type: none.
   
5. Click OK button.
   
6. Exit Registry Editor.

Note: Above registry tweak only applies to Windows XP users.


Below instructions only applies to Windows Vista and later versions of Windows users.

1.  Launch the Registry Editor by pressing Windows + R keys to open Run box, type regedit.exe, and click OK button.

2. Navigate to the following registry key:

Code:

HKEY_CLASSES_ROOT\Directory\shell


3. Right-click the folder named Shell, choose New > Key.
   
4. Type: Print Directory, and press ENTER key.
   
5. Right-click on “Print Directory”, Choose New > Key.
   
6. Call the new key: command, then press ENTER key.
   
7. Double-click the Default value. Type: Printdir.bat "%1", in the Value Data field.
   
8. Click OK button, and exit Registry Editor.

If you don't see “Print Directory" context menu option reboot your computer.