I download a lot of articles for offline reading and archiving. When I download an article, it gets saved as

AuthorFirstName AuthorLastName - title.ext

Once I have read the article (assuming I want to keep it) I rename it to

AuthorLastName, AuthorFirstName - title.ext

I wrote a python script (swapnames.pyw) that does the renaming. I would like to add a context menu entry so that I can right click on a file (with varying file extensions) and select "Swap Names" from the menu. Can anyone tell me what keys/data items I need to add to do this?

I just spent the last two hours on google but all I have found are manual methods that don't work and installable utilities that also don't work.

6 Years
Discussion Span
Last Post by Reverend Jim

Figured it out. Two problems. One was where to add it, the other was remembering to account for the path portion in the rename. This was the registry mod I needed.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Swap Names]

[HKEY_CLASSES_ROOT\*\shell\Swap Names\Command]
@="c:\\python27\\pythonw.exe d:\\utils\\swap.pyw \"%1\""

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.