There is no direct way in Windows to make a list of the contents of a folder. If the contents are very limited you can probably just type out a list. But what if there are lots of contents, for example a multi-GB music folder?
Here is what you can do if you need to print out a list of the contents of such folders. You can create a small batch file, and then add it to the right-click context menu, so that all you will have to do is right-click and select Print Directory Contents (or whatever text you want).
First, open Notepad, and type in the following:
@echo off
dir %1 /o:g>c:\directory.txt
start/w notepad/p c:\directory.txt
del c:\directory.txt
exit
Save this in the root of the C drive as print_directory.bat. Now, in order to add this option to the right-click context menu, you will need to edit the default folder properties. In Windows Explorer, go to Tools > Folder Options > File Type. Click on the File Folder file type and then click on the Advanced button at the bottom right. Now, click on the New button. In the Action field, enter the name of the action, such as Print Directory or Print Contents, and in the Application to be used to perform this action field, fill in C:\print_directory.bat. Click OK three times and then close to exit.
Before you do anything, check to see that if you double-click a folder it actually opens normally, because sometimes the Search function gets set as default. You really don’t want to have to right-click every folder and select Open. So let’s fix this first:
Open the Registry Editor and navigate to HKEY_CLASSES_ROOT\Directory\shell\. Edit the default value (which might have changed to “Open” or “Find”) and change it to Explorer.
Now make sure you can double-click and open folders again, and then you’re ready to test the Print Contents / Directory command you just made. Right-click on a directory and select “Print Directory (or whatever you called it). You will get a pop-up that will ask you where to save “directory.mdi”. This is the Microsoft Document Imaging format, which makes a nice, neat and readable file that will list out the contents of the directory, and then save it. It will open with Microsoft Office Document Imaging.
You May Also Be Interested In...
- Easily print a file or folder list with Karen’s Directory Printer
- Listing the contents of a folder/directory made easy
- How to change the default folder to which Word and Excel files are saved
- How to pin a folder to the task bar in Windows 7
- How to remove components that don’t appear in Add/Remove dialog
- Fastest way to import your contacts into Gmail
- How to change the default file type for Word 2007 and Excel 2007
- Recover text from any file using Microsoft Word
Subscribe Now
If you enjoyed this post, you will definitely enjoy our others. Subscribe to the feed to get future posts delivered right to your mailbox or feedreader.



{ 2 comments… read them below or add one }
Hi,
is this not good one?
dir >list.txt
Is Folder Printer is good to print directory contents