Naming files in non-Logical/Absolute Order

Bulk Rename Utility How-To's

Naming files in non-Logical/Absolute Order

Postby lesexyfoxy » Fri Aug 14, 2020 6:08 pm

Hi,

I know that some have asked "Why is BRU sorting my files in 1000, 100, 10, 11 etc?
I know how to fix, that, by checkmarking "Logical Sorting" in the options menu.
Then the files are sorted by 1,2,3 etc.

However, now comes the interesting question.
Is there a way that I can take all my files, that are correctly numbered in 1,2,3 and all the way to 8000- something, to then rename them to keep their current position, but be named to fit the "non-logical" sorting, or what the BRU called it, Absolute sorting.

"The default sort-sequence for all operating systems earlier than XP is to use absolute sorting, e.g. 1.txt, 10.txt, 11.txt, 2.txt, 21.txt."

My grandparants bought one of these displays to slideshow pictures and it displays pictures in Absolute absolute order and there is no way of changing the settings.

It drives me nuts, but for this time only, is there a way to take my Logical 1,2,3,4,5...7999,8000 list and rename it to the Absolute order, so each picture keep their logical position?

Thanks!
lesexyfoxy
 
Posts: 1
Joined: Fri Aug 14, 2020 5:53 pm

Re: Naming files in non-Logical/Absolute Order

Postby therube » Sat Aug 15, 2020 5:32 pm

Are the files named as numbers 1 .... 8000 ?
If you pad the numbers with 0's, will that do it?

1:Regex:
Code: Select all
Match:  ^(.)$
Replace:  000\1

Match:  ^(..)$
Replace:  00\1

Match:  ^(...)$
Replace:  0\1

Pad the 1 character names with 000, the 2 character names with 00, & the 3 character names with 0.

No, that's not right, is it.

(You'd have to run one, then the other, then, the last.)
Last edited by therube on Sat Aug 15, 2020 5:55 pm, edited 1 time in total.
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Naming files in non-Logical/Absolute Order

Postby therube » Sat Aug 15, 2020 5:54 pm

Let's go the other way, fill the numbers with 0's.

1:Regex:
Code: Select all
Match:  ^(.)$
Replace:  \100

Match:  ^(..)$
Replace:  \10


I'm not getting my head around it...
I think this might do it, with exceptions, as in you'll hit some duplicates...
Order in which you do the replacing might take care of that?
4-digit names should be OK?
What about 3's?
Fill the 1 character names with 00, the 2 character names with 0 [& the 3 character names ?].
(You'd have to run one, then the other, then, the last.)

That's closer, better, but still not right...

PS: I call it Natural vs ASCII sort.

Code: Select all
1                        1
10                           |   100
11                           |   110
2                            |   200
23                           |   230
3                            |   300
33                           |   330
333                        333
5                            |   500
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To