Print The Directory

Satheesh C B | Wednesday, June 25, 2008 | 3 comments

If you want to make a list of all the contents of a directory, you’re going to have to find a much easier way than typing it all out. If it’s a multi-GB music directory, you’ll end up with aching fingers before you’re even halfway through. Here is an easier way. 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 something like that).

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 Types. 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 thrice 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. Rename it to the name of the directory, and then save it. It will open with Microsoft Office Document Imaging.

You can also try Karen’s Directory Printer v5.2.6 for printing a Directory

sparksspace016

It can print the name of every file on a drive, along with the file´s size, date and time of last modification, and attributes (Read-Only, Hidden, System and Archive)! And now, the list of files can be sorted by name, size, date created, date last modified, or date of last access

 Download | Freeware |1.25MB

Category: , , ,

Welcome to SparksSpace . This blog launched on Dec 2007 with a focus on Technology.You can find latest Computer Software, Tutorials, Tricks,Tips & Software promotions here!

3 comments:

  1. quite facinating

    Everything worked up to the point of trying to print c:\

    The print directory option did not appear on the menu.

    ReplyDelete
  2. I have now lost my "search" function on all folders save for c:\

    ReplyDelete
  3. The simplest solution is to do a System Restore, to get back to a point before your registry was changed . Click Start, Programs, Accessories, System Tools, System Restore, and follow the wizard to take you back to an earlier restore point. If you know when the trouble started, pick the latest point before that time.

    If yours is Vista,Try this
    http://www.howtogeek.com/howto/windows-vista/restore-the-search-item-to-the-folder-context-menu-in-windows-vista-sp1/

    ReplyDelete