Forum Discussion
Sort by Name not proper for numbered files.
Just trying to understand the logic of OneDrive's "Sort by Name" when it comes to numbers. Take a look at the below. "9-26" shouldn't be coming before "9-3". The number 26 should be perceived as after 3. I cannot honestly say I've seen that issue with other storage services.
- It’s by design. In order to fix it you have to put always ensure your number have 2 digits.
Ex. 2021-9-4 should be 2021-09-04 and then your file will have the proper order.
9 Replies
- PeterHughes1580Copper Contributor
Drive1000 It appears File Explorer is not consistent with OneDrive so does anyone know why this is the case?
- Mike WilliamsSteel ContributorIn what way is it not consistent?
Examples needed.- PeterHughes1580Copper Contributor
Mike Williams Hi, so File Explorer will sort Test2 then Test11, whereas OneDrive will sort Test11 then Test2.
- jab365cloudSteel ContributorIt’s by design. In order to fix it you have to put always ensure your number have 2 digits.
Ex. 2021-9-4 should be 2021-09-04 and then your file will have the proper order.- DavidLeaCopper ContributorBy Design?
I think you mean NOT by design and clearly a balls up.
If it was by design why does no other microsoft tool / app do this? Even windows by default does not act in this way and can sort as intended without needing to say go 01 to 20 rather than just 1 to 20.
Its a mistake that should have been fixed ages ago - Drive1000Copper ContributorThank you, I did consider that but I have thousands of files and will need to figure out a command line to change them all with variables involved. I thought I had resolved it at first with sorting by file creation date but that is not always accurate to the file contents, hence the name scheme.
Hopefully this is something the devs can reconsider.- Mike WilliamsSteel Contributor
Drive1000 In your example, it's not necessarily clear that these are dates. Credit cards and other codes have a similar format numeric dashed format. To sort as you desire, use ISO 8601 date formatting with 2 digit months for unambiguous representation as recommended by most data management authorities.