Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sorting directories named as guid

So in windows, if you have a bunch of directories named by GUID and you sort on name, it does not sort alphabetically. I think this applies to 7 and vista. I have not found any pattern either. Is windows thinking they are something else? From a coding perspective, we have some legacy projects that store assets in GUID folders, and without sorting it can be difficult to quickly verify data.

I

enter image description here

like image 414
FlavorScape Avatar asked Jun 04 '12 22:06

FlavorScape


2 Answers

Mark Ransom seems to be right about how windows sorts. W7 seems to do natural sorting. This "feature" can be disabled using the following instructions. However, 'tis a stupid shame: you cannot make these edits on windows 7 home premium.

http://www.alliancegroup.co.uk/windows7-explorer-sort-order.htm

Barring that you can try:

1) Type gpedit.msc in the Start menu’s search box and then press Enter. 2) Navigate to User Configuration>Administrative Templates>Windows Components, and then select Windows Explorer in the left column of the Group Policy editor. 3) Disable numerical sorting in Windows Explorer in the Settings section of the Group Policy editor.

like image 69
FlavorScape Avatar answered Oct 01 '22 02:10

FlavorScape


It's applying what's known as a "natural sort" - the numeric and alphabetical sequences are being split and sorted separately. The first parts of your examples are numeric, and are sorted thus: 1, 3, 5, 07, 7, 9, 19, 57, 214, etc. and then followed by the ones that start with alpha.

I don't think there's any way to change it.

like image 39
Mark Ransom Avatar answered Oct 01 '22 01:10

Mark Ransom