Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change the position of folders in sort by Kind views Desktop
It's just a little thing, but it bothers me that when sorted by Kind in List view, folders are clumped under "F in the middle of the file list. Sure, I understand that the computer sees a folder as just another file, but to my mind, a folder is a container for files, and as such, is distinct from other file types (at least in the context of situations in which I want to sort by Kind in the first place). For this reason, I would prefer folders to sort either to the beginning or the end of a list sorted by Kind.

For most applications, the string used to define the "Kind" of documents it "owns" is stored in that application's Info.plist. However, in the case of the system, the location is a little harder to find. It turns out that it is in the Localized.strings file of a given language's .lproj folder, within the directory: /System -> Library -> Frameworks -> ApplicationServices.framework -> Versions -> A -> Frameworks -> LaunchServices.framework -> Versions -> A -> Resources. Within the Localized.strings file, the addition of a single space eliminated my sorting order woes, ie. changing:

"Folder" = "Folder"; to "Folder" = " Folder";

A full restart was required for the changes to take effect. Other types included in the file are: "Alias," "Application," "Classic Application," "Document," "Package," "Trash," "Unix Executable File," "Volume," and "%@ Document" which seems to refer to files "owned" by Classic apps.

Other than breaking AppleScripts that are dependent on "Kind ... is folder" statements, I haven't noticed any ill effects (so far...). Since this hint only edits the localized version of the string, my (unqualified) opinion is that it should be safe. Any reasonable application should be aware that OS X can be running in a number of languages, so it shouldn't be dependent on the localized name of a file type, but rather the "archetype" name -- i.e. the string on the left side of the equation. For example, the Finder's "Find..." command still works. However, since a system file is involved, proceed at your own risk. Make a backup first, be careful making changes, and for security reasons, make sure the ownership and permissions haven't been altered. Also keep in mind that the changes may be wiped out by future system updates.

[robg adds: This change worked as described. To edit the file, you'll need to have admin powers. I changed the ownership on the enclosing Resources folder to my admin user, edited the file with TextEdit, told it to Overwrite when saving, and then switched the ownership of Resources back to the system. After a restart, folders did indeed float right to the top of the list. If you want them to go to the end of the list, you'd have to use one of the characters discussed in this hint.]
    •    
  • Currently 3.40 / 5
  You rated: 5 / 5 (5 votes cast)
 
[18,656 views]  

Change the position of folders in sort by Kind views | 11 comments | Create New Account
Click here to return to the 'Change the position of folders in sort by Kind views' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change the position of folders in sort by Kind views
Authored by: cynikal on Sep 24, '04 12:50:12PM

speaking of finder quirks.. does it bother anyone else that when you open the finder in list mode (cmd+2), it will use the same default heading choices/widths every time, with the filename, date, and then size..

i care more about the size of files than the date, so everytime i work with a new folder, i always need to manually move the size field before the date field.. and i can't seem to figure out a way to default the finder list view to put the date before date (and subsequently, get rid of the date field altogether).

and while i'm at it, why can't the finder make the width of the size field automatically fit the file sizes in the folder by default? I regularly work with files with sizes in the order of hundreds, and i ALWAYS have to resize the size field with newly created folders to make the entire size fit.. otherwise it will say "69.. MB".. is it that dificult/imposible to make it automaitcally size it so i can fit the entire 696.3 MB ??



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: theocrates on Sep 24, '04 02:37:23PM

There is always a way in Mac OS X--that is, if you have a will.

Getting the Finder to display the window info (i.e., Name, Size, Version, etc) in the order you want was brought up a while back in the hint entitled "Change the default list-view column order". (Do a MacOSXHints search for that article name to find it.) I believe you can also set the default column widths as well by putting a different number between the <integer> tags.

You'll have to edit the Finder's PLIST file, but, believe me, it's not that difficult at all. Just open the file in TextEdit and cut and paste the <dict> tags in the order you want them. Don't be afraid; just follow the pattern and you'll be fine.

Remember to make a backup of the original PLIST file first, in case you muck up the one you're editing.



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: zane on Sep 26, '04 09:03:28PM
The hint mentioned above is here:

Change the default list-view column order

...and it's quite a handy little hint. After playing around with it, I was wondering if anyone can advise me on a slightly related topic. No matter what I try, I can't get the "Calculate All Sizes" global property to remain checked. I rely of my list-view's "size" column a lot for calculating folder sizes, and have to check this option for each and every new window, despite having already set it under Global View Option about 50 zillion times.

Is there anywhere in the com.apple.finder.plist file that I can modify to set this property to true, permanently, once and for all?

[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: theocrates on Sep 29, '04 09:34:09PM

Zane:

You know, I've had the same irritation with the Calculate Folder Sizes and other window preferences. It's like the Finder always defaults to the factory setting for certain preferences.

My understanding of the Finder (both in Classic and OS X), from what I have found out on my own and from what I have read, has unfortunately led me to believe that each window's preferences are more or less set individually; and only windows opened from the original window whose preferences were set will display what you have checked.

Anyway, I do not know of any way to make the preference stick permanently. But at least you have company in this one, minor annoyance!



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: 01smithp on Sep 27, '04 08:00:01AM

You can change the default position of the column in the Finder by editing the com.apple.finder file in your (home) preferences folder (I use Property List Editor from the dev tools). The stuff to change is located under 'StandardViewOptions' > 'Nlsv' > 'Columns' > [items in order by number]. Just copy and paste the names and stuff around to change their order.
If you don't know what some of the names mean just refer to an open finder window.



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: cynikal on Sep 27, '04 12:06:21PM

i love you guys.. this worked like a charm.

i have a good amount of unix experience so editing plist files doesn't scare me, but thanks for your concern just the same..

now if only i could figure out how to change the default finder window size, i'd be set!



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: frankxiv on Jan 23, '05 02:24:44AM

I have been looking for a way to make all folders float to the top for so long that I tried this tip without thinking it through. While it does as advertised you have to take note that it floats the folders to the top when sorting by KIND. In other words, the folders float to the top but the rest of the list is sorted by kind and therefore your other files aren't in alphabetical order. Instead they are in order by KIND and then alphabetical in their different kinds. This makes the tip completely useless for what I want :-(

What I am looking for is a tip that will work in list or column view and will sort the items as follows:

1) List all folders alphabetically.
2) List all remaining files alphabetically.

Later, Frank



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: zorinlynx on Mar 20, '05 03:07:55PM

I've always wondered why Apple doesn't implement this. It sounds like something obvious and yet they still haven't added it in. Anyone using a Tiger preview know if it's in Tiger yet?



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: boothefox on Jun 14, '07 06:02:34AM

OMG if this was already known before Tiger and they didn't implement it.... it means in Leopard they won't do that too... stubborn foools... :/



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: chimerical on Oct 28, '08 04:49:31PM

I'm still waiting for this behavior too.



[ Reply to This | # ]
Change the position of folders in sort by Kind views
Authored by: pixu on Dec 09, '07 01:40:40AM

This trick doesn't seem to work with 10.5. Oh why can't Apple make this an option!



[ Reply to This | # ]