User:Jeff G./massrename
User:Jeff G./massrename.js adds a portlet link named "MassRename" (or "massrename" on Monobook) to "Rename stuff" (files with names that match a particular search string) on cat pages en masse. Users who click it are prompted for a source category name (default is the currently displayed category, what to search for, what to change that to, and a freeform reason which defaults to "[[COM:FR|rename criterion 2]]" AKA "rename criterion 2". There are 6 checkbox options: "Match case", "Treat search string as a regular expression", "Do prompt every file?", "Move & Replace", "Leave a redirect behind:", and "Try to replace usage immediately using your user account:". Use is limited to Admins and Filemovers because those are the only two user groups allowed to rename files here. Named developer Perhelion has been "away on vacation" since November 2019, so documentation from that user may not be forthcoming. Former developer Legoktm may have some more documentation, and edited Meta as recently as 05:25, 18 September 2023 (UTC).
For my first renaming job, commissioned at COM:BR#bulk renaming, I found that: neither automatic ("Do prompt every file?" checkbox unchecked as default) nor semiautomatic (checked) runs full-out (both stopped for unexplained reasons); every time I restarted, I had to refresh "Replace with:" to remove the fully substituted name of the next file the script wanted to rename to; and actual mass renaming is best accomplished by checking all the boxes, and babysitting with a finger on the "Enter" key or the left mouse button. I used "Jacobs(\d\d).jpg" for "Search for:" and "Georgiy Jacobson - Beetles Russia and Western Europe - plate $1.jpg" for "Replace with:". I used "File renaming criterion #3: To correct obvious errors in file names, including misspelled proper nouns, incorrect dates, and misidentified objects or organisms, per COM:BR#bulk renaming." for "Reason / Why do you want to move this file?", but I suppose it could have been shorter.
For my second renaming job, commissioned at special:diff/806250451, I gathered the files in Category:Jefftemp and used "niveristy" for "Search for:" and "niversity" for "Replace with:". I used "File renaming criterion #3: To correct obvious errors in file names, including misspellings, per special:diff/806250451" for "Reason / Why do you want to move this file?". I also used "Correcting obvious errors in file description pages, to wit the misspelling of "[U|u]niversity", per special:diff/806250451" as the reason for changing the misspellings in file description pages.
For my third renaming job, commissioned at special:diff/808474890, I gathered the files in Category:Jefftemp and used "Fortress Lousbourg" for "Search for:" and "Fortress Louisbourg" for "Replace with:". I used "File renaming criterion #3: To correct obvious errors in file names, including misspellings, per special:diff/808474890" for "Reason / Why do you want to move this file?".
Please see en:Wikipedia:User scripts#How do you install user scripts? for installation, and Microsoft on regex and Well House consultants on regex for help on regex. — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 11:19, 1 October 2023 (UTC)