Automator workflow of the month: Easily encrypt folders
- 29 July, 2013 14:10
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.