Batch Rename broken in latest version

Ask for help and post your question on how to use XnView MP.

Moderator: xnview

laurent45654
Posts: 29
Joined: Sat Dec 21, 2024 6:54 pm

Batch Rename broken in latest version

Post by laurent45654 »

Let's say I have a folder of files:

01.png
02.png
03.png
04.png

Sorted by name.

Then I manually move 01.png to get this:

02.png
03.png
01.png
04.png

Then call batch rename on this to rename them all ##.png.

I expect this:

02.png => 01.png
03.png => 02.png
01.png => 03.png
04.png => 04.png

That's how all previous version of XnView have been working, and it seems logical to me. But in 1.11.4 I get this instead:

04.png => 01.png
01.png => 02.png
03.png => 03.png
02.png => 04.png

So somehow it starts with the latest file. I thought I was going crazy initially, with all my batch renames being flipped around but I can replicate it consistently. Is that a known bug?
jkm
Posts: 605
Joined: Sat May 11, 2024 12:43 am

Re: Batch Rename broken in latest version

Post by jkm »

"Broken" is not a good title for this. It has a bug, minor enough some people might not notice.

I can reproduce a bug, but it does not agree with your example.

In 1.11.2, the Batch Rename honored the sorting order in the Browser. In 1.11.4, it does NOT honor the sorting order in the Browser, and instead seems to always impose Alphabetic Descending. :bug:

In your example, in order for this
laurent45654 wrote: Sun Jun 28, 2026 1:54 pm Then I manually move 01.png to get this:
to be true, you must be using Custom Sort in the Browser.

If I use custom sort to produce this order:
02.png
03.png
01.png
04.png

Then Batch Rename in 1.11.2 shows:
02.png => 01.png
03.png => 02.png
01.png => 03.png
04.png => 04.png

(This is the old behavior, which you wanted, and which I agree is appropriate.)

But 1.11.4 shows THIS: (100% of the time)

04.png => 01.png
03.png => 02.png
02.png => 03.png
01.png => 04.png

It doesn't "start with the latest file". It imposes Alphabetic Descending sort, regardless of the sort order in the browser. Changing to any non-custom sort in the Browser doesn't matter. Batch Rename always imposes Alphabetic Descending.

So are you sure your example you posted above is correct? Maybe provide a screenshot.

I see a bug, but not exactly the behavior you're reporting.

I've created a bug report.
laurent45654
Posts: 29
Joined: Sat Dec 21, 2024 6:54 pm

Re: Batch Rename broken in latest version

Post by laurent45654 »

Right, that's indeed what I observed now that I think about it. Well broken or buggy I don't know, but not usable as it is
jkm
Posts: 605
Joined: Sat May 11, 2024 12:43 am

Re: Batch Rename broken in latest version

Post by jkm »

laurent45654 wrote: Sun Jun 28, 2026 8:00 pm but not usable as it is
To you. Not for lots of people.

It’s perfectly usable for anyone who needs an alphabetic sort, which is the default of the browser anyway. That’s why I said some people might not even notice as an issue what you consider to be unusable.

I'm sure Pierre will address it in the next release…