Sep 24, '04 10:45:00AM • Contributed by: Anonymous
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.]
