Add an item to the file context menu
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.
Reverend Jim
Posting Shark
1,161 posts since Aug 2010
Reputation Points: 253
Solved Threads: 158
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\""
Reverend Jim
Posting Shark
1,161 posts since Aug 2010
Reputation Points: 253
Solved Threads: 158