Compressing archiver that lists contents?

Is there any archive utility that will display an archive file’s contents? Suppose you have several dozen archives, and each of this contains a few dozen phone recordings. Without a list, you’d have to go uncompress archives one by one to find just one recording. But a list would let you scan the archives and find the one that has that one recording. Even better, you could extract one file at a time without uncompressing the whole archive.

Is there any such tool? It’s been years since I’ve looked for a new compressor, so this might be standard by now.

I haven’t looked for GUI archiver tools for a long time, but if you are comfortable with the command line, macOS include the Info-ZIP utilities for accessing zip files.

The key utilities in this suite are zip, unzip and zipinfo. Run any of them without parameters to get a quick summary of the options or type man followed by the command (e.g. man zip or man unzip) to view the manual page.

To view the contents of a zip file, any of these should get the job done:

  • zipinfo filename
    This is my preferred mechanism:
    $ zipinfo bab5_station_decals.zip 
    Archive:  bab5_station_decals.zip
    Zip file size: 1631057 bytes, number of entries: 3
    -rw----     2.0 fat  1602699 b- defN 01-Jul-02 00:01 b5_decals_forStarshipModeler.jpg
    -rw----     2.0 fat    95726 b- defN 01-Jul-02 00:01 DecalPlacement.jpg
    -rw----     2.0 fat     6874 b- defN 01-Jul-02 00:01 scicloneBanner.gif
    3 files, 1705299 bytes uncompressed, 1630671 bytes compressed:  4.4%
    
  • unzip -l filename
    This is a basic listing of the contents:
    $ unzip -l bab5_station_decals.zip 
    Archive:  bab5_station_decals.zip
      Length      Date    Time    Name
    ---------  ---------- -----   ----
      1602699  07-02-2001 00:01   b5_decals_forStarshipModeler.jpg
        95726  07-02-2001 00:01   DecalPlacement.jpg
         6874  07-02-2001 00:01   scicloneBanner.gif
    ---------                     -------
      1705299                     3 files
    
  • unzip -lv filename
    The -v (verbose) option shows more information about the files:
    $ unzip -lv bab5_station_decals.zip
    Archive:  bab5_station_decals.zip
     Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
    --------  ------  ------- ---- ---------- ----- --------  ----
     1602699  Defl:N  1533264   4% 07-02-2001 00:01 721757d4  b5_decals_forStarshipModeler.jpg
       95726  Defl:N    90698   5% 07-02-2001 00:01 d500680b  DecalPlacement.jpg
        6874  Defl:N     6709   2% 07-02-2001 00:01 e6c8e1ed  scicloneBanner.gif
    --------          -------  ---                            -------
     1705299          1630671   4%                            3 files
    

The nice thing about command-line tools is that they are easily scriptable. So you can, with a minimal amount of work, run them against a directory tree full of files, filtering the output for the filename(s) you care about.

3 Likes

Have you tried right-clicking on an archive and selecting “Quick Look”? I just did so on a .zip archive and a list of files popped up.

Also for Installer packages, this utility is useful:

(I’ve had Suspicious Package on my Mac for years and haven’t ever noticed any ill effects or problems caused by it.)

Either you installed third-party software, or this is new for macOS Sequoia. On my system (running Sonoma 14.6.1), quick-look on a Zip file just shows the archive’s name, icon, size and date.

2 Likes

I’m on Ventura. In any case, perhaps the Quick Look list is related to having Suspcious Package installed since you aren’t seeing the list.

If you just want to take a peek inside, you can use QuickLook thanks to this free add-on

https://macitbetter.com/BetterZip-Quick-Look-Generator/

4 Likes

@gingerbeardman helped me figure out why Quick Look generates a list of files in .zip archives on my machine. A very long time ago, I put WinZip Mac on my computer. One of WinZip’s features is enhancing Quick Look just like BetterZip.

3 Likes

I use Path Finder for this purpose (both compress/decompress and viewing contents), but if you don’t already use Path Finder, it’s not worth paying for just for that when there are free options for managing archives.

Hmm, interesting stuff here, including Info-Zip. The last time I fooled with command lines was years ago. But what the heck, I’ll give it a try. Thanks, everyone.

I just did a right click in Finder and ‘Get Info’ provided the list of enclosed files

1 Like

BetterZip

2 Likes

BetterZip 5 is good! I had forgotten that I had it, mostly because I was too lazy to use it well in favor of simpler apps. But upon second glance, it actually fits the bill completely. Thanks, Gordon Meyer.

Show Info does not work for me with Sonoma. Same for Quickview. So you might have other extensions/apps in play.
Same for Mojave on an Intel iMac.