Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

List content of zip file

Featured Replies

I am looking for a function to list the content of a zip file.

Does anyone have anything to share ?

 

(I want a list of files and folders within the zip file. Much like the List dir content recursively function)

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

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
}

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.