Print Directory
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.
- Create the Printdir.bat file
To create the Printdir.bat file, paste the following text into Notepad:
printdir.bat:
@echo off dir %1 /-p /o:gn > "%temp%\Listing" start /w notepad /p "%temp%\Listing" del "%temp%\Listing" exit
savedir.bat:
@echo off dir /-p /o:gends > "c:\directory.txt" 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
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.
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
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 these steps: 1. Start Registry Editor. 2. Locate the Default value under the following key in the registry: HKEY_CLASSES_ROOT\Directory\shell 3. Click Modify on the Edit menu. 4. In the File data box, type: none 5. Click OK. 6. Quit Registry Editor.