Windows Sort sequence irritant -- wrong sequence


  1. Posts : 11,210
    Windows / Linux : Arch Linux
       #1

    Windows Sort sequence irritant -- wrong sequence


    Hi there

    when browsing through tagged music files Windows seems to come up with the WRONG sort sequence

    For example if I'm browsing Mozart

    Mozart symphonies /CD 1
    Mozart symphonies /CD 10
    ------- /CD 14
    Mozart symphonies /CD 2
    Mozart symphonies /CD 3


    What I want is for the list to be displayed as /CD 1
    /CD 2 ....../.CD 10 etc.

    Excel also hoses it up too

    any ideas on how to fix this without a whole slew of file / track re-tagging / re-numbering.

    Seems bonkers to have 10-19, 20-29 etc displayed before 2, 3 etc. I don't want to renumber a whole slew of stuff to for example /CD 01 etc to force sequence correction. I've about 1.7 TB worth of tagged music files !!!.

    Cheers
    jimbo
      My Computer


  2. Posts : 13,695
    Windows10
       #2

    It has always been this way - it is called lexicographical sorting ie text is sorted from left to right. No easy way round it without 3rd party apps.

    Basically, sub ten numbers have to be numbered xxxx01, xxxx02 etc ie with a leading zero (or two zeros for sub one hundred if more than one hundred,three if more than 1000 and so on).
      My Computer


  3. Posts : 13,959
    Windows 10 Pro X64 21H1 19043.1503
       #3

    This worked in Windows 7, may still be valid in Windows 10:
    Microsoft Windows 7 Explorer Numerical Sort Order
      My Computers


  4. Posts : 11,210
    Windows / Linux : Arch Linux
    Thread Starter
       #4

    cereberus said:
    It has always been this way - it is called lexicographical sorting ie text is sorted from left to right. No easy way round it without 3rd party apps.

    Basically, sub ten numbers have to be numbered xxxx01, xxxx02 etc ie with a leading zero (or two zeros for sub one hundred if more than one hundred,three if more than 1000 and so on).
    Hi there

    @cereberus

    On my NAS server there's no problem - It's just Windows / File explorer hoses it up.

    Also if a Directory / Folder / file / track name etc is longer than around 200 chars then File explorer can't handle it at all !!!!!

    Here's what I believe something like it Should look like. (From my NAS server)

    Windows Sort sequence irritant -- wrong sequence-snapshot15.png


    These files > 200 chars can't be handled by File explorer -- Why should I rename them - the tracks etc are descriptive of the content.

    Windows Sort sequence irritant -- wrong sequence-snapshot16.png

    Cheers
    jimbo
      My Computer


  5. Posts : 35,535
    Win 10 Pro (21H2) (2nd PC is 21H2)
       #5

    @Ztruker- the GP still exists in '10 so should work- and does. Thanks.

    These files > 200 chars can't be handled by File explorer -- Why should I rename them
    Presumably path length restriction. If they are as long as that, wouldn't you have other problems with them?

    Good musical taste.. hope you've got some good speakers.
      My Computers


  6. Posts : 13,695
    Windows10
       #6

    jimbo45 said:
    Hi there

    @cereberus

    On my NAS server there's no problem - It's just Windows / File explorer hoses it up.

    Also if a Directory / Folder / file / track name etc is longer than around 200 chars then File explorer can't handle it at all !!!!!

    Here's what I believe something like it Should look like. (From my NAS server)

    Windows Sort sequence irritant -- wrong sequence-snapshot15.png


    These files > 200 chars can't be handled by File explorer -- Why should I rename them - the tracks etc are descriptive of the content.

    Windows Sort sequence irritant -- wrong sequence-snapshot16.png

    Cheers
    jimbo
    Sure - Different software using different basis.

    Windows has always used lexicographical sorting since day 1. All computer systems in old days used that basis (dates back to mainframe days)

    Just for clarity, lexicographical sorting does not consider numeric numbers. Numbers are just treated as letters - sorting is in effect on the ascii value of characters from left to right (but clever enough to handle A and a as the same letter). As numbers have ascii numbers lower than letters, this means file names starting with numbers will be before file names starting with a (A).

    In essence, it is an overstatement to say Windows hoses it - it just works on a different basis. In the end, I doubt Windows will ever change.

    If the regedit proposed works, fine.

    ----------------------------------------------------------------------------------------

    Re. length - long filenames are supposed to be in W10 now but .....

    You can fudge long file name by mapping a root drive to be a long path.

    Z:\ = C:\dir1\dir2\dir3\......dir n\

    A bit of a hassle but it works.
      My Computer


  7. Posts : 35,535
    Win 10 Pro (21H2) (2nd PC is 21H2)
       #7

    Doesn't look like long file names are supported- I just tried creating a couple of 262 characters.

    If your file name + folder path < 255, then adding characters to the file name stops at the path limit.

    Couldn't rename one that exceeded the limit- and I had file explorer crash trying to do so.
      My Computers


  8. Posts : 11,210
    Windows / Linux : Arch Linux
    Thread Starter
       #8

    cereberus said:
    Sure - Different software using different basis.

    Windows has always used lexicographical sorting since day 1. All computer systems in old days used that basis (dates back to mainframe days)

    Just for clarity, lexicographical sorting does not consider numeric numbers. Numbers are just treated as letters - sorting is in effect on the ascii value of characters from left to right (but clever enough to handle A and a as the same letter). As numbers have ascii numbers lower than letters, this means file names starting with numbers will be before file names starting with a (A).

    In essence, it is an overstatement to say Windows hoses it - it just works on a different basis. In the end, I doubt Windows will ever change.

    If the regedit proposed works, fine.

    ----------------------------------------------------------------------------------------

    Re. length - long filenames are supposed to be in W10 now but .....

    You can fudge long file name by mapping a root drive to be a long path.

    Z:\ = C:\dir1\dir2\dir3\......dir n\

    A bit of a hassle but it works.

    Hi there

    @cereberus and @dalchina

    Thanks for replies - but :

    BTW the regedit doesn't fix the problem of File explorer not showing long names.

    Long file names will fail on any software relying on Windows / File explorer -- so for example browsing a directory to play a file with say VLC will fail -- or at the best it will truncate the file to something unrecognizeable but sill actually play.

    For example

    Windows Sort sequence irritant -- wrong sequence-snapshot17.png



    Will need some way without renaming stuff to be able to serve this music up to Windows clients though without a mega rename operation !!!.

    My smart TV handles the files OK but I suppose that's because it's an Android based type system with no historical limit on files (based on the old DOS 8.3 format) which Windows still uses - even though we are well into C21 now !!!.

    Cheers
    jimbo
      My Computer


  9. Posts : 35,535
    Win 10 Pro (21H2) (2nd PC is 21H2)
       #9

    BTW the regedit doesn't fix the problem of File explorer not showing long names.
    Hi, it's not specified or expected to do so- merely change the sort order rule.
    Windows Sort sequence irritant -- wrong sequence-snap-2017-03-28-14.05.26.jpg
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:22.
Find Us




Windows 10 Forums