I've got ~50 zip files, each containing a similar directory structure but with different files inside.

Is there a way I can easily dir the contents of those zips?

I'm interested in creating a list of all the files with their relavite paths, such as a/b/c/file.txt

link|improve this question

feedback

3 Answers

Download the command-line version of 7-zip (7za) and do a 7za -l. This will list the contents of the file. You can then, of course, put this into any kind of batch script.

link|improve this answer
feedback
  • Info-Zip's UnZip (in zipinfo mode):

    unzip -Z1 foo.zip
    zipinfo -1 foo.zip
    

    More information:

    unzip -Z foo.zip
    zipinfo foo.zip
    
  • 7z:

    7za l foo.zip
    
link|improve this answer
feedback

If you have jdk you can try jar: $ /cygdrive/c/jdk1.6*/bin/jar -tf tcpmon-1.0-bin.zip tcpmon-1.0-bin/ tcpmon-1.0-bin/apidocs/ tcpmon-1.0-bin/apidocs/org/ tcpmon-1.0-bin/apidocs/org/apache/ tcpmon-1.0-bin/apidocs/org/apache/ws/ tcpmon-1.0-bin/apidocs/org/apache/ws/commons/ tcpmon-1.0-bin/apidocs/org/apache/ws/commons/tcpmon/ tcpmon-1.0-bin/apidocs/org/apache/ws/commons/tcpmon/class-use/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.