Help2Go
Free Computer Help.
Powered by Volunteers.




Print Directory (Folder) Listings in Windows XP

by whoozhe
June 7, 2004

This article describes how to add the Print Directory feature for folders in Microsoft Windows XP.
After you follow the steps that are listed in this article, you can right-click a folder, and then click Print Directory Listing to print a directory listing of the contents of a folder.





The information in this article applies to:
Microsoft Windows XP Home Edition
Microsoft Windows XP Professional

Important: This article contains information about modifying the registry.
Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs.


There are three steps in the process.

1. Create the Printdir.bat File
2. Create a New Action for File Folders
3. Edit the Registry


Step 1
Create the Printdir.bat file
To create the Printdir.bat file, follow these steps:
Click Start, All Programs, Accessories and choose Notepad.

Paste the following (including the line "exit") text into Notepad:

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

On the File menu, click Exit, and then click Yes to save the changes.
In the Save As dialog box, type the following text, and then click Save:
%windir%\Printdir.bat
(This will save Printdir.bat in your default windows directory)

Step 2
Create a new action for file folders
Click Start, click Control Panel (or, point to Settings, and then click Control Panel), and then click Folder Options. (You may need to switch to Classic View first.)
On the File Types tab, click File Folder.
Click Advanced, and then click New.
In the Action box, type:
Print Directory Listing

In the Application used to perform action box, type:
printdir.bat or browse for the file

Click OK.
Click OK, click OK, and then click Close.

After you follow the steps in the previous sections, Search Companion may start when you double-click a folder instead of the folder being opened. Or, if you have associated other actions with file folders, those actions may be performed instead.

To resolve this issue, follow Step 3:

Step 3
Edit the registry
Warning: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Start Registry Editor. (For more information on editing the registry, see this tutorial.
Locate the Default value under the following key in the registry:
HKEY_CLASSES_ROOT\Directory\shell

Click the Edit menu and choose Modify.
In the Value data box, type:
none

Click OK.
Quit Registry Editor.

You can test this now by right-clicking on a folder and choosing "Print Directory Listing" from the pop-up menu.


Whoozhe

Discuss this article here



Have a question? Need help? Get free, friendly person-to-person help with your computer questions or spyware questions in our help forums!

Creative Commons License

(C) 2008 Help2Go - Contact Us