If you are in need of printing out the content of your folders, more regularly than often – you have probably already got a freeware of sort to help you do that. However, wouldn’t it be great if you could right-click a folder and choose “Print Directory” instead ?
Well, I found out how to do so.
With a small executable batch-file, and a little registry tweak you can create a Context-Menu that, will print the content of any folder. Simply Right Click the folder name, Choose: Print Directory and: Voila.
To all you freeware developers out there… I’m so Sorry …
Here’s how
First, let me point out – for Windows XP users, there are THREE steps and for Vista/Windows 7 Users there are only two. So pay attention to my lead, okay ? Good. Let’s get it on.
Step 1 (all Windows Versions)
First, we need to create a small executable batch file, which we’ll call something like: Printdir.bat.
- Click Start, click Run, type notepad, and click OK.
- 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 - Choose File, Save As
- In the Save As dialog box, type:
%windir%\Printdir.bat(This will save the file in your Windows Directory).
- Click Save
Step 2 (XP Users Only)
In Windows XP, we now need to create a new action for file folders.
- Click Start, then Control Panel, and then click Folder Options.
(Or, click Start, point to Settings, click Control Panel, and then click Folder Options.) - On the File Types tab, click File Folder.
- Click Advanced, and then New.
- In the Action box, type:
Print Directory. - In the Application used to perform action box, type:
printdir.bat. - Click OK.
- Click OK 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, Move to Step 3.
Step 3 (XP Users only – Vista/Windows 7 jump to step 4)
This part require that you edit the Registry. Make sure you backup your registry to avoid serious errors. Once you have done that, you may continue.
- Start Registry Editor.
- Locate the Default value under the following registry subkey:
HKEY_CLASSES_ROOT\Directory\shell - On the Edit menu, click Modify.
- In the Value data box, type: none.
- Click OK.
- Exit Registry Editor.
Step 4 (Vista / Windows 7 Users)
This part require that you edit the Registry. Make sure you backup your registry to avoid serious errors. Once you have done that, you may continue.![Print Content of Directory from your Context Menu [How To] RegEdit PrintFOlder1 650x252 Print Content of Directory from your Context Menu [How To]](http://i0.wp.com/mintywhite.com/wp-content/uploads/2010/04/RegEdit-PrintFOlder1.png?resize=650%2C252)
- Start Registry Editor.
- Locate the following registry key:
HKEY_CLASSES_ROOT\Directory\shell - Right Click the folder named Shell, choose New, Key.
- Type:
Print Directory, and press ENTER. - Right-Click on “Print Directory”, Choose New, Key.
- Call the new key:
command, then press ENTER. - Double-click the default entry. Type:
Printdir.bat "%1", in the Value field. (Thanks for the tip in the comments Edward.) - Click OK, and exit Registry Editor.
There you go !
About Thomas
Computer geek from the age of 7, which amounts to 30 years of computer experience. From the early days (when every computer company had their own OS) of DOS, Windows 1.0 through Seven...
Search Windows Guides