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

macososx-snow-leopardzip

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.

Best Answer

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.