Jump to content

List content of zip file


This topic is 3848 days old. Please don't post here. Open a new topic instead.

Recommended Posts

In windows you can  send event to winzip command line and  to record contents to a text file then load that 

from winzips site, the usage would be: wzzip -vb filename.zip >logfile.txt

In OS X their should be something similar

Link to comment
Share on other sites

Hej,

 

zip_ArchiveContents ( fm_OsPathToArchive )

import java.util.zip.ZipException
import java.util.zip.ZipFile

try {
    def file = new ZipFile(fm_OsPathToArchive)
    fList = []
    file.entries().each { it ->
        fList << it.name
    }
    return fList
} catch (ZipException zex) {
    return zex.message
}

or

import java.util.zip.ZipException
import java.util.zip.ZipFile

try {
    def file = new ZipFile(fm_OsPathToArchive)
    return file.entries().toList()
} catch (ZipException zex) {
    return zex.message
}

Link to comment
Share on other sites

hi claus,

 

zip -sf /path/to/your/zip/file.zip

 

will list the whole content on os x. for more info type "man zip" into a cli.

 

egbert

Link to comment
Share on other sites

This topic is 3848 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.