In Mac OS X, how can I unzip a zip file without unzipping its contents?

10

5

I have a zip file that contains another type of archive (in this case, a jee app server WAR file, but this happens with other contained archive types as well). When I unzip the zip file, instead of presenting me with the contained .war file, the war file is decompressed as well. Is there a way around this? I've tried with 'The Unarchiver', 'Archive Utility', and the command line 'unzip' utility.

Adam Tuttle

Posted 2010-07-02T03:07:58.383

Reputation: 697

1Did you try with 7-Zip? – None – 2010-07-02T05:04:07.430

Answers

21

Open the Archive Utility (/System/Library/CoreServices/Archive Utility), open its preferences (in the Archive Utility > Preferences menu), and uncheck the "Keep expanding if possible" option.

p.s. If you want to get at these prefs easily (e.g. if you want to be able to switch this setting on & off at whim), you can install the Archive Utility prefs into System Preferences by opening the Archive Utility package (right-click or control-click on the application, and select Show Package Contents), then navigate to Contents/Resources, and double-click Archives.prefPane to install it.

Gordon Davisson

Posted 2010-07-02T03:07:58.383

Reputation: 28 538

1Neat, had no idea there was a hidden prefPane – ghoppe – 2010-07-02T16:20:48.560

Nor did I. Great tip man! – peelman – 2010-07-03T03:17:21.067

1Bizarre and good to know +1 – Dan Rosenstark – 2010-10-05T21:29:49.450

1

IMHO the command line unzip tool should just unzip the specified file. It should not unpack double-zipped files.

Mike L.

Posted 2010-07-02T03:07:58.383

Reputation: 4 539