---
title: "How to Create a “Clean” Zip Utility in macOS Finder (No Junk Files)"
description: "Zipping a folder on a Mac adds .DS_Store and __MACOSX junk. How I built a Clean Zip option into Finder with Automator, with no Terminal and no extra app."
url: "https://stg-3a6ivm.elementor.cloud/how-to-create-a-clean-zip-utility-in-macos-finder-no-junk-files/"
canonical: "https://stg-3a6ivm.elementor.cloud/how-to-create-a-clean-zip-utility-in-macos-finder-no-junk-files/"
post_type: "post"
author: "Miriam Schwab"
date_published: "2026-03-25T20:21:33+00:00"
date_modified: "2026-03-30T13:14:00+00:00"
featured_image: "https://stg-3a6ivm.elementor.cloud/wp-content/uploads/2026/03/cleaanzip.webp"
categories: "Work"
extractor: "block"
---

I was trying to compress a folder on my Mac and was annoyed that it kept including hidden metadata files like .DS_Store and __MACOSX folders in the zip. While these are harmless on a Mac, they appear as "junk" files to everyone else and are simply unnecessary.

I figured there must be a solution, so I went looking. I didn't want to use the Terminal every time I needed to zip a folder, and I wasn't interested in downloading a third-party utility for such a seemingly simple task.

After some experimentation with Gemini, I found a way to build a native "Clean Zip" tool directly into the macOS Finder using Automator! It’s a set-it-and-forget-it solution that works beautifully.

### The Problem with Default Compression

The standard right-click "Compress" option in Finder is designed for Mac-to-Mac transfers. It preserves Mac-specific file attributes, which results in those extra hidden files. While you can technically use the zip command in the Terminal to exclude them, it’s a manual, repetitive process that breaks the flow of working in the Finder.

### The Solution: A Custom Quick Action

By using macOS's built-in Automator app, you can create a "Quick Action" that appears in your right-click menu. This allows you to perform a "clean" compression with a single click, using the power of a script without having to deal with a command line.

#### Step 1: Set up the Automator Workflow

#### Step 2: Add the Magic Script

Delete any text in the script box and paste the following:

```
for f in "$@"; do
    cd "$(dirname "$f")"
    zip -r "${f##*/}.zip" "${f##*/}" -x "*.DS_Store" -x "__MACOSX*"
done
```

This script tells macOS to:

Tip: This script is designed to also handle multiple items at once. Whether you select one folder or highlight ten different files, the "Clean Zip" action will create individual, junk-free archives for every item in your selection.

#### Step 3: Save and Use

### The Result

You now have a custom, native tool that creates clean archives ready for any operating system. No third-party apps, no Terminal windows, and no "junk" files stuffed in there. It’s a small workflow tweak that makes a huge difference in productivity, and makes me very happy!