I find that I occasionaally have special projects where it would be nice to have a context menu for files. I tend to write housekeeping scripts and it is convenient to be able to run these scripts against one or more files at a time without having to navigate and run through the command line. For example, I have accumulated a large number of articles and ebooks. I file them with a consistent naming convention, to wit
Author Name - Title.ext
where the author name is in the form "First Last" if I have not yet read the article or book, and "Last, First" if I have. A convenient tool would allow me to right click on a file name and select "Swap Names" from a context menu. Adding such a menu turns out to be trivial. The script in this code snippet demonstrates how this can be done. Customizing this snippet to add your own custom menu item and code is as simple as writing a function, renaming the script and providing the text for the context menu.
Installing or removing the context menu is as simple as typing (in a command shell running as Admin)
swapnames -install swapnames -uninstall
Comments and suggestions are always welcome.
Edited 3 Years Ago by Reverend Jim