Inspecting the contents of a ZIP file?

Is there any way to get a list of files that are contained in a zip file without unzipping it?

I’m trying to replace a Stuffit script with a non-Stuffit version. With Stuffit I’m able to open the archive, check for the file I want and then decide whether to decompress the file.

I was thinking that a workaround for this would be to store the names of the compressed files in the comments of the ZIP file, but it seems kind of awkward/hokey.

This should work:

set file_ to POSIX path of (choose file)
set the_script to "unzip -l " & file_
set the_file_list to do shell script the_script
display dialog the_file_list

this script was automatically tagged for
color coded syntax by Script to Markup Code
written by Jonathan Nathan

Cool! Thanks.

Now to convert ~50k .sit files to .zip… Figure that’ll take a couple days. Thank you AS.