Commons talk:File renaming

This is the talk page for discussing improvements to Commons:File renaming.

See Commons:Village pump/Proposals#Proposal: Allow file movers to delete single-revision redirects during file moves. Regards, ZI Jony (Talk) 23:55, 5 March 2026 (UTC)

Renumbering

The 282 files in Category:The Windswept Pages are named:

and then:

I want to rename the first 99 so that they are numbered 001 to 099, so that they sort correctly. Can I use this tool to do that, and if so how? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:39, 29 March 2026 (UTC)

Probably wAWB could be used for that with regex for the file name change. However, as for how I don't know and if you find out or somebody knows maybe this info added should be added to some page. Prototyperspective (talk) 15:12, 29 March 2026 (UTC)
Disregard my prior answer – this should be possible with VisualFileChange via batch task on the category and 'regex to change numbering' before ".JPG". Prototyperspective (talk) 10:00, 30 March 2026 (UTC)
Where's the "rename" option in VisualFileChange? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:55, 30 March 2026 (UTC)
Ah okay that must have been why I suggested wAWB first but it should work with User:Perhelion/massrename.js when you check "Treat search string as a regular expression" I think (and if not maybe somebody could improve the script). Prototyperspective (talk) 12:23, 30 March 2026 (UTC)
In that case, if my search string is - \d\d.JPG what is the "replace" string? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:18, 30 March 2026 (UTC)
Looks like you just want to attach a 0. Quickly asking an LLM it showed To add a 0 in front of your search string \d\d.JPG, the "replace" string should be 0$0. This will prepend a 0 to the matched digits before the file extension. Use 0$0.JPG as the replace string but I haven't checked if this is accurate and you'd need to drop - . Prototyperspective (talk) 13:26, 30 March 2026 (UTC)