Use a unix-style syntax for copies names in Finder

Nov 16, '05 06:24:00AM

Contributed by: TwoTimes

When you duplicate an item (myfile.txt, for example) in the Finder, the duplicate's name becomes myfile copy.txt. If you're a Unix user, you might prefer to see the Unix-style copy syntax, which would be myfile~.txt.

To change the default copy name, navigate into /System -> Library -> CoreServices -> Finder.app -> [Control-click and Show Package Contents] -> Contents -> Resources -> English.lproj, and then open Localizable.strings with administrator privileges. Replace this line...

"N4" = "^0 copy";
...with this line:
"N4" = "^0~";
. Save your changes, quit the editor, and relaunch the Finder (Option-click-hold on its Dock icon, via Terminal, Activity Monitor, etc.).

Another thing you should know is that known extensions will make the tilde appear before the dot, while unknown extensions will produce a name like User.ini~. Pure old-school!

[robg adds: As with any system file modification, I strongly suggest you back up this file before modifying it. This file contains all of the Finder's responses to various events; you could tweak the heck out of your system by changing multiple lines in this file -- from a quick look, I think you could, amongst other things, rename the Sidebar, change the way labeled items are displayed, tweak various Spotlight search language, modify error messages, and tons more. One line of interest to me is this one:
"N2" = "untitled folder";
Change the untitled folder bit to something else, and you change where new folders appear in a sorted-by-name view. In my case, I set it to _• new folder (the underscore is really a space; I just wanted it to show here), which forces all new folders to the top of my column view windows.

The easiest way to edit this file is to drag it to your Desktop; this will make a copy, leaving the original in place. Make another duplicate and add "backup" or somesuch to its name. Now open the Desktop copy of the original, and make your changes. Save the changes, and drag the modified file back into the English.lproj folder, and answer the authenticate and replace dialogs as necessary. Note that this will change the permissions on the source file, though I've never had any issues it. If you run Disk Utility's Repair Permissions, all will be back to normal...]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20051111045346649