Do your own easy way to compress files or folders as a clean zip with simple services on macOS Finder.
- Zip files or folders without any .DS_Store and __MACOSX file.
- Zip files or folders with the full parent path beginning under ~/, known as username, to the ~/Documents folder.
There are two way to create the services.
Way 1: Copy and Paste (If you run into a problem about encoding of workflow file while trying this way, please try Way 2 instead.)
- Directly download the latest release and uncompress it.
- Move those two service files to the local service folder. You can easily copy ZIP.workflow and ZIP with path.workflow to your local $USER/Library/Services/ directory. (Please set your Finder to be able to see hidden directories via shortcut key [Shift] + [Command] + [.] first.)
- Done !
- Open Automator app.
- Press [Command] + [N] to new a document which type is Service.
- Select Action > Library > Files & Folders > Get Selected Finder Items and drag it to the right side as Step One.
- Select Action > Library > Utillities > Run Shell Script and drag it to the right side as Step Two.
- Drop down Pass input of Step Two and select the to stdin.
- Copy content text of file from this project, ./src/zip.sh, paste it as the Step Two shell content text.
- Look up the top, drop down Service recives selected and select files or folders.
- Press [Command] + [S] to save this service with specified name "ZIP" (or any custom name yourself).
- Done !
- To create second Service, ZIP With Path, just repeat Way 2 and change to copy content text from ./src/zip_with_path.sh.
- Select files or folders in Finder, open conetxt menu and select Service > ZIP (or ZIP with path).
- That's all !

- You can assign shortcut key for services via Keyboard in System Preferences to make things more easily.
- Recommend [Control] + [Command] + [Z], meaning as Zip and [Control] + [Command] + [P], meaning as zip with full parent Path.
- Tutorial
- ZIP with path would ignore path, /Documents, if files or folders are already under ~/Documents.
- You can custom destination folder of ZIP with path via edit the variable destDir.
- I never test it lower than High Sierra.
- You may find out the script not elegant itself, because I never code any shell script before, and I bought my first mac a month ago. I look forward to any suggestion or fork.
MIT License
- Star this project if you like !
- Or you can donate me via
Donate me via PayPal
Donate me via OPay(歐付寶)