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.

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]
"Icon"=""
"Position"="Bottom"

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.