Display quirk or bug?

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Display quirk or bug?

Postby TheGhost78 » Fri Feb 28, 2025 2:57 pm

Display Options > List > Highlight Name Changes: I have Activate and Use Bold ticked.

With the set of file names below and the RegEx to rearrange them, all but
4AAAA - 5BBBBB - 4CCCC - 001
highlights the second and fourth term in the Name column, and the first and third term in the New Name column.

4AAAA - 4BBBB - 4CCCC - 001
4AAAA - 5BBBBB - 4CCCC - 001
4AAAA - 5BBBBB - 6CCCCCC - 001
5AAAAA - 4BBBB - 4CCCC - 001
5AAAAA - 4BBBB - 5CCCCC - 001
6AAAAAA - 3BBB - 5CCCCCC - 001

(.*) - (.*) - (.*) - (.*)
\2 - \1 - \4 - \3

It would be easier to see the changes if this was consistent for all files.
TheGhost78
 
Posts: 173
Joined: Fri Jul 19, 2024 11:25 am

Re: Display quirk or bug?

Postby Admin » Sat Mar 01, 2025 1:46 am

This is not really a bug, but rather a "known" limitation of the Highlight Name Changes in this type of situations.

When renaming:

from
4AAAA - 5BBBBB - 4CCCC - 001
to
5BBBBB - 4AAAA - 001 - 4CCCC

This can be seen as deleting 4AAAA - and adding it after 5BBBBB or deleting 5BBBBB and addiing it before 4AAAA....
The Highlight Name Changes functionality does not know how you got from 4AAAA - 5BBBBB - 4CCCC - 001 to 5BBBBB - 4AAAA - 001 - 4CCCC and it makes a guess based on distance, length of the changes of the text etc.

In your case it comes to a different highlight for one of the file names.
In such cases the Highlight Name Changes is not always useful....
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Display quirk or bug?

Postby Admin » Sat Mar 01, 2025 1:49 am

Another example, renaming from 123-4 to 3-412. Did we move the last three to the front or the first two to the end.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Display quirk or bug?

Postby TheGhost78 » Sat Mar 01, 2025 4:08 am

For display purposes, could you not enforce a standard, e.g. hierarchy the terms from left to right (1 - n), based on their original positions?

In this situation, AA is the first term that is not in its original position, so that is the one that's highlighted.
AA - BB - CC - DD
\2 - \3 - \1 - \4

After 'eliminating' AA, and replacing it with a 'dummy' term, the BB and CC terms are still in second and third place, so are not highlighted.
<Dummy> - BB - CC
<Dummy> - \2 - \3

Then, after dealing with AA's move, DD is still in the fourth position, so is not highlighted.
BB - CC - AA - DD
\1 - \2 - \3 - \4
TheGhost78
 
Posts: 173
Joined: Fri Jul 19, 2024 11:25 am

Re: Display quirk or bug?

Postby TheGhost78 » Sat Mar 01, 2025 4:37 am

For display purposes, could you not enforce a standard, e.g. hierarchy the terms from left to right (1 - n), based on their original positions?

In this situation, AA is the first term that is not in its original position, so that is the one that's highlighted.
AA - BB - CC - DD
\2 - \3 - \1 - \4

After 'eliminating' AA, and replacing it with a 'dummy' term, the BB and CC terms are still in second and third place, so are not highlighted.
Terms: <Dummy> - BB - CC
Position: 1 - 2 - 3

Then, after dealing with AA's move, DD is still in the fourth position, so is not highlighted.
Terms: BB - CC - AA - DD
Position: 1 - 2 - 3 - 4
TheGhost78
 
Posts: 173
Joined: Fri Jul 19, 2024 11:25 am

Re: Display quirk or bug?

Postby Admin » Sun Mar 02, 2025 12:34 am

We are looking into this, but there are a lot of different cases to consider. For instance going from 1234 to 124, was "3" removed or the last two chars removed and 4 added? The change highlight will not always match the renaming operation that was actually performed as it just highlights changes before and after.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Display quirk or bug?

Postby TheGhost78 » Sun Mar 02, 2025 4:32 am

Original name: 1234
New name: 124

So maybe it should be handled like this:

Name column:
1 and 2 are still there, in their same positions, so are not highlighted.
3 is highlighted because it has been removed, BUT
for working out the correct display in the Name column you replace it with a dummy term and 4 is still in the fourth position, so is not highlighted:
12<dummy>4

New Name column:
1 and 2 are still there, in their same positions, so are not highlighted.
4 has shifted up a place to now be in the third position, so is highlighted.

Essentially, use the original filename as an anchor, and work left to right (or right to left I suppose) to give the terms (in whatever RegEx expression you enter) a hierarchy, always comparing back to the original filename and the positions of those terms in that filename.
TheGhost78
 
Posts: 173
Joined: Fri Jul 19, 2024 11:25 am

Re: Display quirk or bug?

Postby Admin » Sun Mar 02, 2025 6:14 am

OK, but it is also possible that the user actually removed the last 2 chars and appended a 4 for many file names, and that is what it is expected to be highlighted.
Remove last two and append a 4.
For most names that would be highlighted correctly, but 1234 to 124.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm


Return to Suggestions