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

Change the Finder's default name for duplicated files Desktop
I hate the name that the Finder gives duplicate files, as it adds copy at the end of the name but before the extension. This makes renaming files a bit more of a pain. Rather than creating a name like my file copy.ext, I'd like it to be copy of my file.ext, so I can easily select the beginning and have copied files all sorted together.

The way to fix this is easy. Go to /System » Library » CoreServices » Finder.app, control-click on Finder.app, and select Show Package Contents from the pop-up menu. This will open up a new window with all the files inside the Finder. Be aware that you can mess up the Finder up by modifying these files.

Go to Contents » Resources » English.lproj » Localizable.strings, and edit it in your favorite editor (I used Smultron). Search for N4, and you'll find a line that looks like this:
"N4" = "^0 copy";
I changed mine to:
"N4" = "copy of ^0";
Save the file, restart the Finder (using Activity Monitor or Terminal), and you should find duplicated files are now named according to your preferred string.

[robg adds: As long as you're editing that file, you might want to change the default new folder name as well.]
    •    
  • Currently 2.80 / 5
  You rated: 5 / 5 (5 votes cast)
 
[16,170 views]  

Change the Finder's default name for duplicated files | 21 comments | Create New Account
Click here to return to the 'Change the Finder's default name for duplicated files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change the Finder's default name for duplicated files
Authored by: mantrid on Sep 04, '07 07:54:48AM

I hate the fact that everything comes with extensions now. "File" and "File copy" or "Folder" and "Folder alias" worked quite well in the old days. It's the presence of the extensions that make everything look awkward. Not that this comment had anything to do with the hint.

The nice thing about the current arrangement is that by adding a space + copy to the end, the original and the copy are likely to remain together in any alphabetical sorting scheme so that the copy could be moved or renamed easily. Adding to the beginning will likely cause them to separate, which might add the need for a scrolling step.

Still, it's nice to know they can be changed.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: luomat on Sep 04, '07 08:07:15AM

> I hate the fact that everything comes with extensions now. "File"
> and "File copy" or "Folder" and "Folder alias" worked quite well in
> the old days. It's the presence of the extensions that make
> everything look awkward.

Yeah and those kids with their dang rock & roll music are ruining the world.

> Not that this comment had anything to do with the hint.

Yathink?

Your screed against file extensions has absolutely nothing to do with this hint. The presence or absense of extensions wouldn't change this a bit.

But at least you got to vent your feelings in a public forum, right?

Back to the original hint:

THANK YOU for this. It has been a longstanding annoyance of mine as well.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: pascalpp on Sep 04, '07 08:17:26AM

I'm not questioning the utility of the hint, but in fact, file extensions have everything to do with this. Were it not for the file extension, it would be much easier to rename copied files, while still retaining the ability to keep files and copies of files sorted together alphabetically in a list.

And by the way, I don't think the first commenter's point could be described as anything close to a 'screed'. chill out.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: beepotato on Sep 04, '07 01:52:28PM

Well, filename extensions DO have to do with this hint, since the author of the hint cites them as part of the reason why it is "a bit more of a pain" to rename file duplicates.

Which I actually do not completely agree with: since deleting the extension while renaming in the Finder does not actually remove the extension from the name but merely hides it, just delete it at the same time you delete the "copy" at the end of the name.
Except of course if you checked the option to always show extensions in the Finder… but then you would have to be really in love with those stupid extensions in order to do that. ;-P



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: Fairly on Sep 05, '07 02:02:02PM

This is not always true; however the original poster was 99% spot on and the other commenter here was abusive.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: luomat on Sep 04, '07 08:14:04AM

For those of you who like the commandline you can get the file by using this line (note: if it wraps, unwrap it, this should all be one long line):


open -e /System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj/Localizable.strings


[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: mantrid on Sep 04, '07 08:29:33AM

For the purpose of this hint, what good is opening the file if you can't edit it?

Maybe if you had spent more time thinking through your command instead of railing against my comment, you would have posted something that would work for someone not logged in as "root".



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: ClarkGoble on Sep 04, '07 09:29:41AM

Most editors will prompt you for the administrator password when editing these files. Smultron does. The problem with using open at the command line though is that you're never entirely sure what editor will open. That's why I didn't include it in the hint. Of course if you're at the command line using "sudo vi ..." instead of "open" will get you there. Assuming you've got sudo configured for your account.

Anyway open will work if you make this adjustment.

open -a "/Applications/myeditor.app" "path_to_file"




[ Reply to This | # ]
Incrementing File Number?
Authored by: mbpriddy on Sep 04, '07 09:00:35AM

Thank you for this info. Very useful!

Would it be possible for duplication of a file whose name ends in a number to automatically increment that number in the name of the copy? This would save me steps in our production version workflow.

Other files (whose names don't end in a number) would be named as usual.



[ Reply to This | # ]
Incrementing File Number?
Authored by: ClarkGoble on Sep 04, '07 09:47:59AM

That would require reprogramming. It'd be nice if it did that. But I don't think there's any switches to do it.



[ Reply to This | # ]
Incrementing File Number?
Authored by: _Gekko_ on Sep 04, '07 04:05:28PM

SOmewhere in the code something like this exists : when downloading the same file multiple times, incrementing numbers are added to the 'duplicated' files ...



[ Reply to This | # ]
Incrementing File Number?
Authored by: ClarkGoble on Sep 04, '07 10:13:26PM

Well yes its in the code. But they don't have some setting that lets you change the behavior, so far as I know. Thus you'd need to recode it.



[ Reply to This | # ]
Incrementing File Number?
Authored by: _Gekko_ on Sep 06, '07 08:11:03PM

What I was thinking was actually that one would be able to write an applescript (or the like) that would duplicate the file by 'downloading' it from it's own location, p.ex using a browser and assigning the process a 'hot key'. This would give us a fairly easy way of duplicating files with incrementing numbers without messing with te Finder etc. (what has to be redone each time there's an update ...)



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: ClarkGoble on Sep 04, '07 09:31:49AM

You can also restart the Finder by simply option-right clicking on its icon in the dock and selecting "relaunch." That's generally the easiest way to do it.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: CaptDeuce on Sep 04, '07 05:33:14PM
Rather than creating a name like my file copy.ext, I'd like it to be copy of my file.ext, ...

[shudder] I hate that. Do you use Windows much by any chance? :-j

... so I can easily select the beginning and have copied files all sorted together.

I don't understand this. Yes, having things your way is a Good Thing™. Sure, grouping similar files can always be useful. But why in this fashion when there are several alternatives to without resorting to such a hack?

As far as I can see, selecting "copy x" with a mouse isn't significantly easier for a prefix than a suffix. Using a batch name changing utility renders the prefix/suffix completely insignificant. A batch utility may even be easier to use on individual files.

In particular, I'm very interested in the source of the dichotomy. In almost all instances, I prefer to have each of my file "species" kept together in a herd. The only time I want automatically created copies kept together is when I want to treat them as a group such as iWork's "Backup of" files which I just want to trash. But to help in manipulating the file name? I don't get it.

---
"Where's my other sock?" - A. Einstein

[ Reply to This | # ]

Change the Finder's default name for duplicated files
Authored by: ClarkGoble on Sep 04, '07 10:07:52PM

It's easier for me because I have a bunch of files that are boilerplate. I make copies of them and then open them up in Excel, Word, etc. So I may have "Company Name Packing Slip.xls", "Company Name Packing Slip Samples.xls", "Company Name Letter.doc" and so forth. I then duplicate the files I need and then rename them and then open them.

Yes I could use real templates but often I find I've made a small change for some company and just want to copy that. (Say some message I'm just using for that week) So fixed templates aren't quite as flexible as I'd like.

What this tip does is sort them all by "Copy" so they are all together rather than spread out all over the list of names. It also means that when I rename them I just have to move the track pad down slightly and everything lines up. (i.e. no horizontal movement, just vertical) Whereas if "copy" is put as a suffix it is always in an inconsistent location.

Hope that helps.

Can't say it works for everyone's workflow but it improved mine sufficiently that the time I spent poking around in the Finder's innards seemed worth it.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: paulpro on Sep 06, '07 07:34:31PM

Thanks for the explanation, I was also wondering how/where this might be useful. You've made it clear how it could be handy in certain circumstances.

Much appreciated.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: Fairly on Sep 05, '07 01:59:25PM

1. Not everyone needs to get into English.lproj. Some countries remain sufficiently independent to dare use their own languages.

2. I don't know what Finder's role in all this is but it's obviously not using the system wide APIs which normally control this. Probably because it's still not "native" (Cocoa). But this duplication thing is in the system actually. There are myriad cases where the system will duplicate things and this change in the strings file won't affect them.

3. Maybe you didn't notice that there were similar strings for the trash and for HFS+ aliases?

4. Good job otherwise!



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: robg on Sep 05, '07 02:14:15PM

Hints here will *always* assume English.lproj -- it would simply overcomplicate matters to have to explain the language structure of OS X every time I posted a hint regarding English.lproj.

Users who are using other than English as their system language should certainly realize that they will need to edit the proper file in the folder corresponding to their chosen language.

-rob.



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: changcheh on Sep 24, '07 11:19:25PM

If you want to find the copies quickly type "copy" in the search box within that finder window. So quick and easy!



[ Reply to This | # ]
Change the Finder's default name for duplicated files
Authored by: ClarkGoble on Oct 29, '07 02:32:19PM

Just a note that this works in Leopard as well.



[ Reply to This | # ]