files
files copied to clipboard
Implement auto-renaming of multiple selected files
Previous developments squashed into one commit
- Show bulk rename dialog when more than one file selected for renaming
- Allow prefixes and suffixes
- Allow basename same as original, fixed text or partial replacement of original
- Simplified default options
- Allow editing of modifiers if required
- Allow sorting and reversing number sequences
- Allow partial renaming of list
Possible future enhancements in other PRs
- Other file attributes as modifiers or sortby
- Metadata as modifiers
- Character sequence as modifier
- Reorder modifiers
The interface is considerably simplified, especially if the default options are sufficient. E.g. it only requires 2 clicks to add a default number sequence and do the renaming.
More advanced options are still available if requested.
Initial Dialog:

Fixed Basename:
Original with replacement Basename:
Modifier choice:
Number Sequence options:
Date Options:
Fixed text options:

This is definitely an improvement from the previous branch!
I can see where you're going with laying out the prefix and suffix stuff like this, but I think mixing actions with the output is a little confusing and it means actions move around as the UI becomes more complicated and eventually the renaming method becomes lost in all the buttons.
You can get into some situations here that probably don't make sense adding the same prefixes and suffixes that have already been used and you can make a window that's larger than the screen this way pretty easily on a small display:

I'm having a hard time thinking of a better way to solve it than the design that GNOME is using. Having a single text entry where you add placeholders like "[Original file name]" or "[1,2,3]" or "[Creation date: DD-MM-YYYY]" seems incredibly flexible and with a much simpler UI without some of these other issues. It would be very easy to make something into a suffix or prefix or add arbitrary text without having to have explicit actions for that in the UI other than just adding new placeholders for discoverability.
Thanks for the review.
I was trying not to restrict the user too much but that means allowing to them to do something not sensible (as long as it is not destructive). I can certainly restrict some things like having more than one prefix/suffix of the same kind and/or the total number of modifications. Could maybe restyle the "Add -fix" tool to distinguish more obviously from the modifiers? Could have a single separate the "Add -fix" tool like Gnome which defaults to adding a suffix and have an extra option in the modifier menu to make it a prefix?
Personally, I did not find the Gnome interface particularly flexible (at least not obviously). It only offers to add a number range as a suffix for me (with few options). I cannot edit placeholders and if I type one in as a prefix it is not interpreted. Maybe it has improved in a later version?
It seems the more advanced abilities of Gnome Files depend on having Tracker installed and working. I tried installing it but it did not seem to make any difference. Maybe working better in elementary 7? I am still using elementary 6.1
The latest commits limit the modifications to one suffix and/or one prefix (max number is parameterized). The modifier buttons' labels now reflect what they do more precisely.

The window size still tends to change so I may push an alternate design to a different PR.
Using a set of radiobuttons for sorting choice increases the minimum window width and makes width changing on adding modifiers less likely.

Replaced basename combo with radiobuttons:
Unchanged basename (default)

Modified basename

New fixed basename

@danirabbit I have pared down the interface some more and replaced the combobox with radiobuttons. Is this going in the right direction?
Sortby radiobuttons shown when number sequence chosen

@danirabbit Should I continue with this? It has undergone several design iterations. Maybe time to squash and resubmit?
Sorry Marco, still awaiting approval. It is hard to get large amounts of new code approved but in this case there is no way of breaking it up into incremental commits.
I could try reminding Danielle again but she is focused on other projects at the moment.
Jeremy
On Thu, 13 Apr 2023 at 23:54, Marco M. @.***> wrote:
Hi, sorry for asking here. But, is there any progress on this? It's a pretty useful feature.
— Reply to this email directly, view it on GitHub https://github.com/elementary/files/pull/1999#issuecomment-1507702415, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQG3NBFH76FK6P5XZHCS4DXBB7YXANCNFSM5NAXK62A . You are receiving this because you authored the thread.Message ID: @.***>
Great work! Would love to see something like this integrated into elementary OS.
Some quick UX feedback:
People often recommend against horizontal radio buttons:
https://uxplanet.org/radio-buttons-ux-design-588e5c0a50dc#9b5b
For some cases it might be interesting to use the ModeButton?

"The number in order of" might be confused by a kind of sorting/filter option, since it's directly above the before & after preview list. Why not integrate this "The number in order of" in the Number sequence dialog?
You must have considered this but why not configure the name parts in a vertical list? I understand it's slightly less intuitive, but it makes the layout easier / more scalable. It might even make it possible to move/drag parts around.
It could function a bit like the lists you see under Firewall and custom keyboard shortcuts? Having some quick options when you add something, and adding a dropdown per item to customize them
I've not seen something where you can change the order though, which is a big problem for this usecase.
But then again, if the max 1 prefix and 1 postfix is enough there is no need. Keeping it simple & constrained might be the way to go to get the first version in.
@peteruithoven Thanks very much for your feedback :smile: I am quite happy to iterate on the design as I know that is not my strong point.
For some cases it might be interesting to use the ModeButton?
Yes, good idea - I'll try it.
Why not integrate this "The number in order of" in the Number sequence dialog?
Good idea! If there was a reason I didn't do it this way I've forgotten now :stuck_out_tongue:
You must have considered this but why not configure the name parts in a vertical list?
One of my earlier efforts did have a more vertical layout (see https://github.com/jeremypw/bulk-renamer-plugin) but I liked that the horizontal parts matched the actual name so seems more intuitive. If width were an issue could probably make the layout responsive. Supporting narrow layouts was probably not a thing when I started this. If we were to want to support arbitrary numbers of prefixes and suffixes then the UI would have to be rethought anyway.
Keeping it simple & constrained might be the way to go to get the first version in.
Absolutely! Not sure what the minimum feature set that would be useful for a start is here, but suggestions for paring it down further welcome.
Yes, I wrote this a while back and if I went through it again I would definitely find many ways it could be improved in both coding and design but at least it is something that works and can be improved upon in the future depending on feedback.
@peteruithoven As this has now been merged, could you raise issues against specific design flaws so that we can iterate on it? Thanks.