! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar Bulk Renamer has a start limit (9999) to rename by number
Status:
RESOLVED: FIXED

Comments

Description Tomas Senabre 2018-06-08 12:29:35 CEST
Created attachment 7773 
Thunar Bulk Renamer start limit by number

Hello,
I am trying to rename my files with thunar by numbering and when I tried to set the start number above 9999, it was not possible to do so.
I am using GNU/debian Buster 10.0 (testing) with Thunar Bulk Renamer 1.6.15

Thank you for your time and congratulations for your work.
Comment 1 alexxcons editbugs 2018-06-09 22:08:48 CEST
The idea for the numbering renamer is to use a fixed number of digits, selected by "number format". So actually the bug is, that 10000, etc. is used instead of display an error :P.

Currently the max number of digits in "start with" is hard-coded to 4.

I can change the hard coded max number of digits up to 9 without getting fuzz ( thunar-sbr-number-renamer.c:206)

... however I am not sure if this would be the best solution.
IMO instead the following should be changed:
- max number of digits in "start with" should depend on selected digits
- Add a number format for 5  digits: 00001, 00002, 00003, ...

Actually I dont want to add much more than a 5-digit format to the list, since it only pollutes the list and probably nobody (except you) will ever use it.

I am surprised to see that the current options are not sufficient for you. What is your use-case for starting with a number bigger than 9999 ?
Comment 2 Tomas Senabre 2018-06-11 17:05:51 CEST
Created attachment 7778 
Solution numbering over 9999
Comment 3 Tomas Senabre 2018-06-11 17:07:13 CEST
Hi Alex and thanks for your reply,
I work with a large number of files, each of these files contains the results of analysis of a laboratory sample. The sample numbers are like a name never repeated and the files grow over the years. Currently, we are registering samples above the 12000 number.
When I receive, for example, 50 files of an instrument and I have to rename them in a massive way to assign a sample number to each one of them. For this reason I came across this limitation. For example:
IE_TX_12245.csv
IE_TX_12246.csv
IE_TX_12247.csv
IE_TX_12248.csv
IE_TX_12249.csv
IE_TX_12250.csv
.....

It is very rare that someone has to rename more than 10,000 files at once, but I think it is not so strange that the name of these files is above four digits.

I have solved the problem by adding the thousands digits to the text field, I attach a screenshot so you can see the result.

At first when I wrote this BUG, ​​I did not see this possibility, and I thought about adapting the code so that the numerical value entered in "start with" is added to the current four-digit counter, but now I do not know if it is interesting to make changes in the code

I do not know if you understand me because my English is very poor

Thanks for your time
Comment 4 alexxcons editbugs 2018-06-11 21:09:03 CEST
Glad you solved it for your use-case ;) 

Currently I dont have time. But later on I will see if I can add a 5 digit option and fix the digit-limitation in "start with"
Comment 5 alexxcons editbugs 2018-09-04 23:19:05 CEST
Created attachment 7947 
patch

- Allow 8 digits for "start-with" ( After a second check I dont see a disadvantage for just allowing 8 digits .. works fine with all number formats )
- Added 5 digit number format
Comment 6 Andre Miranda editbugs 2018-09-07 03:31:55 CEST
@alexxcons LGTM!

Though in the future if people ask to further extend the padding zeros, we should probably get rid of that combobox and introduce a checkbox "Add leading zeros" and a spinner "How many" (or just the spinner, 0 meaning no padding).
Comment 7 Git Bot editbugs 2018-09-08 01:33:01 CEST
Alexander Schwinn referenced this bugreport in commit c3d3411cb97f76459eacc69b710b6d9432111c86

Thunar Bulk Renamer has a start limit (9999) to rename by number (Bug #14437)

https://git.xfce.org/xfce/thunar/commit?id=c3d3411cb97f76459eacc69b710b6d9432111c86
Comment 8 Git Bot editbugs 2018-09-08 01:35:15 CEST
Alexander Schwinn referenced this bugreport in commit 74373e13737b03bcfa71316fba9fa1f6e14f0041

Thunar Bulk Renamer has a start limit (9999) to rename by number (Bug #14437)

https://git.xfce.org/xfce/thunar/commit?id=74373e13737b03bcfa71316fba9fa1f6e14f0041
Comment 9 alexxcons editbugs 2018-09-08 01:38:51 CEST
@Andre Miranda 
Thanks for testing !  Curious if there will be demand for 6 digit in the future :P

Fixed for master and 4.14 branch, to be released as 1.8.2

Bug #14437

Reported by:
Tomas Senabre
Reported on: 2018-06-08
Last modified on: 2018-09-08

People

Assignee:
alexxcons
CC List:
4 users

Version

Version:
unspecified

Attachments

Thunar Bulk Renamer start limit by number (36.60 KB, image/png)
2018-06-08 12:29 CEST , Tomas Senabre
no flags
Solution numbering over 9999 (91.67 KB, image/png)
2018-06-11 17:05 CEST , Tomas Senabre
no flags
patch (4.57 KB, patch)
2018-09-04 23:19 CEST , alexxcons
no flags

Additional information