How to create a “clean” zip file in MacOS

When compressing files and folders on MacOS you get some mac-specific folders in the zip file. Specially when extracting this zip-files on other OS, this can be quite annoying.

An easy way to overcome this feature is to create an Automator-script for cleaning this zip-files:

  1. Open Automator
  2. Press “New Document” Button
  3. Choose “Service”
  4. Choose on the left hand: Utilities – Run Shell Script and drag the “Run Shell Script” to the work area
  5. Choose “files and folders” and “Finder” and paste
    while read -r p; do
      zip -d "$p" __MACOSX/\*
      zip -d "$p" \*/.DS_Store

    Screen Shot 2017-01-02 at 10.24.16.png

  6. Save it as “Clear ZIP files”
  7. Now you can clean every zip-File with the context menu “services – Clear ZIP files”
  8. Have fun!

Sources: (specially the post of benedikt)

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s