Change the default naming of Create Archive?

From an earlier post on archiving via the contextual menu in the Mac OS X Finder:

"If you archive a single item, the archived file has the name of the original item with a ".zip" extension. If you archive multiple items at once, the archived file is called Archive.zip."

Is there a way to change the behavior of this?

I ask because I want to archive a single file, say "photo.psd" and when I do I get an archive called "photo.psd.zip" - is there a way to create an archive from the contextual menu and have the original file extension be appended? - in this case I would want "photo.zip" to be the end result.

Also, is there a way to change the behavior of archiving multiple files? To, say, create a differently named file afterwards instead of the default "Archive.zip" - perhaps something a little more descriptive but standard, like "Your FilesCompressed.zip" - something that would stay the same across each archive creation.

Thanks, I've been manually renaming after all create-archive's. And I do realize other applications could probably do this, but I'm thinking there must be a way to do this in the finder, no? A terminal command? Any ideas would be appreciated.

Dual 1.25Ghz PowerPC G4 (MDD), Mac OS X (10.4.11), 2Gb DDR SDRAM

Posted on Jun 30, 2008 1:20 PM

Reply
5 replies

Jun 30, 2008 8:35 PM in response to nickdynamite

nickdynamite wrote:
Guess I just don't like the way Automator works, might try a script by itself


If you're going to do that, keep this in mind: the Finder uses a different zip than the zip command line. The zip command line program won't preserve the Mac resource forks, if your files have them (and many still do). The Finder's "Create Archive", however, will.

I have some old Final Cut Pro files that are old enough to have resource forks. If I create a zip archive using the Finder of two of them, then look at them with unzip:

$ unzip -l Archive.zip Archive: Archive.zip
Length Date Time Name
-------- ---- ---- ----
70096 03-21-05 20:39 Barcelona Project
0 06-30-08 21:25 __MACOSX/
82 03-21-05 20:39 _MACOSX/.Barcelona Project
61412 11-24-04 04:50 Los Lobos Project
82 11-24-04 04:50 _MACOSX/.Los Lobos Project
-------- -------
131672 5 files


But if I zip them with the command line zip:

$ zip test.zip Los Lobos Project Barcelona Project
adding: Los Lobos Project (deflated 85%)
adding: Barcelona Project (deflated 85%)


And I look at them:

$ unzip -l test.zip 
Archive: test.zip
Length Date Time Name
-------- ---- ---- ----
61412 11-24-04 04:50 Los Lobos Project
70096 03-21-05 20:39 Barcelona Project
-------- -------
131508 2 files


But, the command line tar is resource fork aware:

$ tar -ztf test.tgz
./._Los Lobos Project
Los Lobos Project
./._Barcelona Project
Barcelona Project


And list the contents:

$ tar -ztf test.tgz
./._Los Lobos Project
Los Lobos Project
./._Barcelona Project
Barcelona Project


charlie

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Change the default naming of Create Archive?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.