Goofed Trying to Create Print Directory Listing

  • Thread starter Thread starter Barb Nelson
  • Start date Start date
B

Barb Nelson

Hi Group,

I was trying to create a Print Directory Lising option in
XP using the following steps:

1. Open Notepad
2. Copy the following text and paste it into Notepad:
----
@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing" exit
----
3. In the File/Save As dialog box, type the following:
%windir%\Printdir.bat Save to the Windows folder.

Then..
To add the ability to print a folder's contents to the
right-click menu..

1. Open the Control Panel and then click Folder Options.
2. On the File Types tab, click File Folder.
3. Click Advanced, and then New. In the Action box, type
Print Directory Listing.
4. In the Application used to perform action box, type
printdir.bat, and click OK. Click OK, OK, and then Close.
_____________________________

I followed everything correctly except for one not-so-
small detail, which I realized as soon as I did it..
Instead of clicking on "File Folder" in the Control
Panel/Folder Options/File Types, I clicked on "Folder",
which added an option to print a list of Directories and
Files if you right click on the directory icon on the
left in Explorer, but not the ability to right-
click/print just the files within a folder listed on the
right.

My question is this: How do I undo what I've done so I
can correct the problem?
If I try to assign the association to the "File Folder"
now, I get the error: "The action 'Print Directory
Listing' is already registered for this file type. Please
enter a different name and try again." I guess I need to
un-assign the association I created.
I've tried to edit the registry
HKey_CLASSES_ROOT\Directory\Shell\Print_Directory_Listing\
default
(Edit/Modify) by changing the Value Data from "Print
Directory Listing" to "none" - and
under ..\command\default (Edit/Modify) Value data from
"printdir.bat "%1"" to "none". This didn't work. I've
even deleted the printdir.bat file I created and tried to
start over.

Can anyone advise me what to do?

TIA,
Barb
 
Hello Barb,

| How do I undo what I've done so I can correct the
| problem?

I suggest you retrace your steps, starting from the most
recent thing you did back to the step where you
clicked on "Folder" in Control Panel | Folder Options |
/File Types\.

- Click [Advanced].

- In the "Edit File Types"dialog box,
- in the "Actions" box, click "Print Directory Listing",
- click [Remove],
- click [OK] until you return to the /File Types\.

- In the "Registered File Types" box click "File Folder".

- Click [Advanced].

- Now complete steps 3 and 4.

If all this fails to resolve the issue then you may need
to restore the registry from the backup you made before you
started fiddling around in the registry.

If that fails, then you may need to do a system restore.

I hope you do not need to reinstal XP.

Jan
 
Hi Barb,

You will need to re-create the bat file, then:

Go to: HKEY_CLASSES_ROOT\Folder\shell and delete the
Print_Directory_Listing.

Once done, either merge the edit attached or correct the settings manually
here: HKEY_CLASSES_ROOT\Directory\shell

Lastly, you will need to go to Start/Run and type in: regsvr32 /i shell32

/top10faqs.htm
 
Back
Top