Unarchive (Expand) Archive Files (.zip, .tar, etc.) and Automatically Tag Them

Inspired by this thread, here a tiny and very simple macro to unarchive and tag archive files.

Purpose

Unarchive archive files and automatically tag them with a Finder tag, so that you know later that you already have unarchived them.

What it does

  1. Your Finder selection will be tested for archive files (usually .zip, .7z, .tar, .xz, etc.).
  2. All archive files will be opened (unarchived) with their default application.
    • The “default application” depends on your setup. By default it is the system’s Archive Utility for most archive types.
  3. Any opened archive will be tagged with “unarchived:yes”.
  4. You get a notification with the total count of selected Finder items and the count of unarchived archive files.

How to use

Select one or more archive files (.zip, .tar, etc.) in the Finder and run the macro (default hotkey: F1).

Notes/Tips

  • If you are using the system’s Archive Utility to open archive files, make sure not to set the app to trash or delete the archives after expansion.

  • If you prefer to trash or delete your archives after expansion, you don’t need this macro. Just configure Archive Utility to do so.

  • To see Finder tags you might have to activate the Tags column in your Finder window(s).

  • Tested on macOS 10.15.2 and KM 9.0.4 with macOS’ Archive Utility and The Unarchiver. Will probably also work with other apps. You might see pop-ups where the unarchiving app demands permission to write to the destination folder.

  • You can force the macro to always use a specific unarchiver by setting the Open action to “open with [specific program]”.


Unarchive and Tag.kmmacros (5.4 KB)


01-pty-fs8

2 Likes