Microsoft KB Archive/321379

= How to add the Print Directory feature for folders in Windows XP =

Article ID: 321379

Article Last Modified on 10/20/2006

-

APPLIES TO


 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Professional

-



This article was previously published under Q321379



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

IN THIS TASK
SUMMARY
 * Create the Printdir.bat File
 * Create a New Action for File Folders
 * Edit the Registry



SUMMARY
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.

back to the top

Create the Printdir.bat file
To create the Printdir.bat file, follow these steps:  Click Start, click Run, type the following command, and then click OK:

notepad

 Paste the following text into Notepad:

@echo off

dir %1 /-p /o:gn > &quot;%temp%\Listing&quot;

start /w notepad /p &quot;%temp%\Listing&quot;

del &quot;%temp%\Listing&quot;

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



back to the top

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. On the File Types tab, click File Folder.</li> Click Advanced, and then click New.</li> In the Action box, type:

Print Directory Listing

</li> In the Application used to perform action box, type:

printdir.bat

</li> Click OK.</li> Click OK, click OK, and then click Close.</li></ol>

back to the top

Edit the registry
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

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 these steps:  Start Registry Editor.</li> Locate the Default value under the following key in the registry:

</li> Click Modify on the Edit menu.</li> In the Value data box, type:

none

</li> Click OK.</li> Quit Registry Editor.</li></ol>

back to the top

Additional query words: explorer my computer dir

Keywords: kbenv kbhowtomaster KB321379

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.