Automator workflow of the month: Easily encrypt folders

You can use Apple's Disk Utility to convert a folder into an encrypted disk image--a protected archive that you unlock with a password. Such images are particularly helpful when you're working on confidential company documents away from the office or when your business card reads: International Person of Mystery. But the truth is that creating encrypted disk images with Disk Utility is cumbersome. Thankfully, with a simple Automator workflow, you can secure documents in an instant. It works like this:

Create the workflow

Launch Automator. In the template chooser, select Application and click Choose. Select the Files & Folders library and from its list of actions drag New Disk Image, Get Specified Finder Items, and Move Finder Items to Trash into the workflow area (in that order).

Click Options in the New Disk Image action, and enable the Show this action when the workflow runs option. Configure the Size pop-up menu in this action to read Size Disk Image to fit contents. Enable the Encrypt option. From the When done pop-up menu, choose Unmount and return the image file.

In the Get Specified Finder Items action, click Options and enable both the Ignore this action's input and Show this action when the workflow runs options. Choose File > Save, and in the sheet that appears, name the application Encrypt Image and save it to the desktop.

Work the workflow

To use your new application workflow, just drag a folder that you'd like to encrypt on top of it. When you do this, a New Disk Image window will appear. Enter a name for your mounted volume in the 'Volume name' field. If you like, you can additionally enter a name for the disk image in the 'Save as' field. Click Continue, and a password window will appear where you must enter and verify a password for the disk image.

If you leave the Remember password in my keychain option checked, this image will open without prompting you for a password (because its password has been stored in your account's keychain). If you want to be asked for a password whenever you mount the disk image (as you might if someone else has access to your Mac), then uncheck this option.

The workflow could end here, with your new encrypted archive. But chances are that you don't want an unencrypted version of the folder on your Mac. That's where the second two actions come in. The first prompts you for the original folder by producing a Get Specified Finder Items window. (Depending on the size of the folder you encrypted, it might be several minutes before you see this window.) Just drag your original folder into this window and then click Continue. The folder will be tossed into the Trash by the last action.

Join the CSO newsletter!

Error: Please check your email address.

Tags OS X Mountain LionAppleAutomatorsecurity

More about Apple

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Christopher Breen

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts