Hi,
Has it ever discussed allowing regular expression syntax in the rename window in nautilus?
It would be very handy when you have to remove certain parts of file names which follow some convention. e.g.:
Hi,
Has it ever discussed allowing regular expression syntax in the rename window in nautilus?
It would be very handy when you have to remove certain parts of file names which follow some convention. e.g.:
I was just now showing off the native bulk rename feature to my Mac/Win colleagues and was saying how nice it would be if it supported regex… wild.
Seems it has been discussed before, but determined to be a “smart option” which was something they were trying to avoid (back in 2016), and a PR from 2020 was closed referencing that sentiment.
Refs:
I agree with @antoniof’s sentiment on the PR, that the proposed implementation in the PR would have been, and still could be for many, confusing since the method defaulted to regex.
That being said, and with the caveat that I’m not a Gnome developer, with Linux DE’s growing more prevalent it may be worth some reconsideration. Definitely not defaulting to regex, but maybe a toggle or checkbox to provide the option to use Regex.
Examples of this can be found in VScode, and even Gnome Text Editor, or (in fear of mentioning a competing file manager, albeit not as visually appealing) Nemo. Pictures of each solution below, respectively.
Edit: Adding a rudimentary mock up to suggest using the gear icon like Gnome Text Editor does, which would only appear if the user clicked the Find and replace text radio button. If the user clicks the gear then the additional option(s) like “Regular expressions” (or even “Case sensitive” and “Match whole word only”) would appear. This would keep the initial UI clean and provide a familiar way for users to expose advanced options.
Your UI proposal would be terrific and It wouldn’t overwhelm the average user.
Let’s hope this is reconsidered in the near future.
+1 for regex checkbox.
My instinct was to recommend just moving to commandline for something like this, but I never new about the bulk rename, and if it exists, it’ll be made more useful by adding regex perl or extended support.
For someone like me that would naturally go to the commandline when things get this complicated, the regex checkbox in the GUI would save me time by letting me see my proposed changes instantly, without having to put debug echos in a script or ls the changes before a mv.