Natural Order Sorting
Moderators: Hacker, petermad, Stefan2, white
Natural Order Sorting
Hi,
I think it would be nice to be able to sort files with natural sort order.
So if you have: file3.jpg, file20.jpg, file2.jpg, file10.jpg, file1.jpg they would be sorted like this: file1.jpg, file2.jpg, file3.jpg, file10.jpg, file20.jpg and not like this (the normal ASCII way): file1.jpg, file10.jpg, file2.jpg, file20.jpg, file3.jpg
For more info:
http://www.naturalordersort.org/
http://sourcefrog.net/projects/natsort/
PS: I useed search, but didn't find anything on this topic!
I think it would be nice to be able to sort files with natural sort order.
So if you have: file3.jpg, file20.jpg, file2.jpg, file10.jpg, file1.jpg they would be sorted like this: file1.jpg, file2.jpg, file3.jpg, file10.jpg, file20.jpg and not like this (the normal ASCII way): file1.jpg, file10.jpg, file2.jpg, file20.jpg, file3.jpg
For more info:
http://www.naturalordersort.org/
http://sourcefrog.net/projects/natsort/
PS: I useed search, but didn't find anything on this topic!
- pdavit
- Power Member
- Posts: 1529
- Joined: 2003-02-05, 21:41 UTC
- Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
- Contact:
It’s one of those cases where everyone is annoyed by something but due to getting used to it nobody has the “ability” to trigger it! I would certainly like this feature too. I cannot think of any cases where the current sorting will be needed but just in case we can always have a tick box in configurations or an ini entry.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Christian Ghisler Rules!!!
It's very hard(at least for me:?) to imagine the good algorithm for the "natural" sorting. The numbers in filename is just charachters. How should be sorted files 1pic2.jpg, 2pic5.jpg, 5pic3.jpg? BTW i live in Israel and in hebrew filenames sometimes used right-to-left reading order. Any suggestion?
I think is much more easy to use standard sorting and zero-leading padding.

dude, there is nothing to implement. i posted a link, where you can download the algorithm for C!VadiMGP wrote:It's very hard(at least for me:?) to imagine the good algorithm for the "natural" sorting. The numbers in filename is just charachters. How should be sorted files 1pic2.jpg, 2pic5.jpg, 5pic3.jpg? BTW i live in Israel and in hebrew filenames sometimes used right-to-left reading order. Any suggestion?I think is much more easy to use standard sorting and zero-leading padding.
Ok, reality check:
Normal sorting order is called dictionary order, and that is what's implemented in any file manager beginning with windows explorer and ending with TC. No program I know and respect implements the UNnatural order you suggest;
query: which of the files is first when sorting by name (ascending): [z.pop] or [1z.pop]
answer: normal order -> 1z.pop, z.pop
UNnatural order -> z.pop, 1z.pop (why you ask, because I meant '0' before 'z' I just didn't write it)
Can you see where I'm heading...
P.S. Did any of you write to Oxford so they would fix the 'UNnatural' order in their dictionaries.
Cheers.
Normal sorting order is called dictionary order, and that is what's implemented in any file manager beginning with windows explorer and ending with TC. No program I know and respect implements the UNnatural order you suggest;
query: which of the files is first when sorting by name (ascending): [z.pop] or [1z.pop]
answer: normal order -> 1z.pop, z.pop
UNnatural order -> z.pop, 1z.pop (why you ask, because I meant '0' before 'z' I just didn't write it)
Can you see where I'm heading...
P.S. Did any of you write to Oxford so they would fix the 'UNnatural' order in their dictionaries.
Cheers.
dude, z.gif is NOT 0z.gif!!!!!!!!!!!!!!!!
so, with natural sorting it still would be 1z.gif, z.gif
but, z10.gif and z2.gif, become z02.gif and z10.gif! you really have no idea what i'm talking about here, do you? there are other programs which can sort with Nat. Order Sort! And it's quite easy to implement!
so, with natural sorting it still would be 1z.gif, z.gif
but, z10.gif and z2.gif, become z02.gif and z10.gif! you really have no idea what i'm talking about here, do you? there are other programs which can sort with Nat. Order Sort! And it's quite easy to implement!
Free fast image hosting: http://picserver.org/
My own quote.... please reread my previous post.dude, z.gif is NOT 0z.gif!!!!!!!!!!!!!!!!
I'm not saying it's difficult, I'm saying that your so-called 'natural' order is not mine, moreover it's silly.UNnatural order -> z.pop, 1z.pop (why you ask, because I meant '0' before 'z' I just didn't write it)
z11.kll z2.kll should be sorted as they are listed, if you want them to be in reverse -> pad the numbers with '0' because that is what you mean. And call Oxford not Christian.
Cheers.