Somehow do operations on numbers in file names via "Find and replace text"
Use cases
I'm using Ubuntu 18.04.2, Nautilus 3.26.4
Trying to rename a selected group of files that contain a number in the file name, e.g.:
Rename:
"Scanned 2019-06-10 18-40 (10) ok.jpg"
"Scanned 2019-06-10 18-40 (11) acceptable.jpg"
...
"Scanned 2019-06-10 18-40 (23) good.jpg"
"Scanned 2019-06-10 18-40 (24) ok.jpg"
TO:
"Scanned 2019-06-10 18-40 (11) ok.jpg"
"Scanned 2019-06-10 18-40 (12) acceptable.jpg"
...
"Scanned 2019-06-10 18-40 (24) good.jpg"
"Scanned 2019-06-10 18-40 (25) ok.jpg"
Desired behavior
After choosing Rename, besides "Rename using a template
" and "Find and replace text
" -> another option could be added: "Find and replace numbers
" -> This option would consist of:
"Replace the [ ]
th found number (denoted by <n
>) in the selected file names with [ ]
(e.g. n+1 - valid operations are +, -, * and /)."
where [ ]
-> represents a text field to be completed by the user
For example: "Replace the [6
]th found number (denoted by <n
>) in the selected filenames with [n+1
] (e.g. n+1 - valid operations are +, -, *, / and %)."
Benefits of the solution
This syntax could be useful for example for renaming a large number of scanned pages at once - for example the pages of a book scanned as ".jpg" files scanned with a scanner device - but not only: also files with a version number in name could be renamed.
Possible drawbacks
Only a number on a single position in the filename can be handled at once.