Archiver — Archive like a pro. 😎

So, I wake up one day and I find my desktop all cluttered with files from last year. 😓 I was thinking ‘I wish there was a way to archive all this with the click of a button’ — I was like eh… maybe some AppleScript for the rescue? 🤔 But then again, I despise AppleScript, so after a lil bit of procrastination I started Googling. Enter Automator — AppleScript without the Script. 😍

Without any further adieu, let’s see how to archive like a pro!

  1. Firstly, open Automator, create a Service.
Image for post
Image for post
Automator

2. Select Folders under Service receives selected and in to Finder. This allows the service to be run on folders on Finder.

Image for post
Image for post
Service receives selected Folders in Finder

3. Search for Create Archive drag and drop it into the workflow. Save as can be same name as input because we’ll be running the script on multiple folders and this avoids naming ambiguity. Where specifies where the archive is saved (I’m gonna save it on the Desktop for now).

Image for post
Image for post
Create Archive Action

4. Now for a test run. Push the Run button and you’ll notice a Warning popup — “This service will not receive input when run inside Automator…” which means that there is no input when you run the service from automator, to fix this we drag and drop the Get Specified Finder Items action above the Create Archive action. Click on the Add… button and add a folder to archive. Click on the Run button now and you can see .zip file on the desktop with the same name as the folder.

Image for post
Image for post
Get Specified Finder Items Action

5. Rename the archives with date and time to better organize. Drag and drop Rename Finder Items below Create Archive. This action will postfix a date to the archive.

Image for post
Image for post
Renaming the file with date

Finally, Remove the Get Specified Finder Items action. Which we only included to test run, now that we’ll be running it on real folders, we don’t need it.

Voilà! It’s done! Now change your archive save location and save the service with an appropriate name (Recommend - Archiver). Now open System Preferences -> Keyboard -> Shortcuts -> Services, Scroll down to Files and Folders, find Archiver and set a shortcut (Recommended - ⌘ ⌥ ⌃ ⇧ A).

Image for post
Image for post
Setting a shortcut to archive

Bonus for the more savvy people!

Let’s add a notification to show you’ve archived something.

Image for post
Image for post
Notification when archived

Firstly, drag and drop the Set Value of Variable action below Create Archive action. Create a new variable called Filename — The name of the file including it’s path is now stored in variable Filename.

Then, use the Display Notification action; place it below Rename Finder Items. Add an appropriate title and message. You can use Filename variable that we ever so smarty set before.

Are you even more savvy? Let’s add a voice to dictate it for you!

Image for post
Image for post
Voice notification when archived

Use the Get Specified Text and the Speak Text actions; drop them below Display Notification. Add a bunch of things to it and you’re it done!

Now go archive everything my child, be free!

Written by

I often explore space.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store