This method will add a shell command when you right-click on a folder, enabling you to print out the directory contents to your default printer. Note that much of this procedure is taken from a Microsoft support article listed here, although some of the procedure appears to have steps missing.
NOTE – after you get the shell command to work, there is a bug in Windows XP. When you double click a folder to open it, the search window will open.
Start Notepad by going to Start, Run, type “notepad” and click OK. Copy the following text into Notepad and save the document to C:\Windows as PrintDir.bat.
@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing" exit
- Close Notepad
- Open My Computer and go to Tools, Folder Options
- Click on the File Types tab
- Towards the top of the list, click on File Folders (Figure 2)
- Click the Advanced button to open the Edit File Type window
- In the Action field, enter “Print Directory Listing”
- In the “Application Used to perform action” field, browse to the BAT file you created earlier (Figure 3)
- Click Ok, Ok, and Close so you are back at My Computer
- To test, browse to a directory under My Computer and right click. Select “Print Directory Listing”. You should now have the directory listing printed out to your default printer.
As mentioned above, you will now need to fix the shell so when you double click on folders, they will open as before. Additional information can be found here.
- Go to Start, Run and type “regedt32” Click OK
- Browse to HKEY_CLASSES_ROOT\Directory\shell. Click on the Shell folder
- In the right-hand window pane, double click on “default” (Figure 4)
- In the “Value Data” field type “none”
- Click OK and close out the Registry editor. Explorer should work as expected now