photos-automation-banner
•
OS X AUTOMATION
AUTOMATOR
IWORK AUTOMATION
•

Importing Images from “Hot Folders”

Creating an off-cloud network workgroup image repository, courtesy of Photos, Automator, and Folder Actions.

“Hot folders” are a very useful tool for developing an image library whose contents are derived from the contributions of team members connected by a local network.

“Hot folders” can be network-mounted share points (folders) such as the Drop Box folder located in the Public folder of your Home folder, or they can be local directories on your computer, such as the Downloads folder. When items are copied into a “Hot folder”, specified actions automatically occur.

In OS X, “Hot folder” functionality is provided through the “Folder Actions” feature that enables any folder to trigger the execution of specified Automator workflows when files or folders are added to then.

As an example, the following steps detail how to create a Folder Action workflow that will automatically import images into Photos when:

  1. they are placed in the host computer’s network-visible public Drop Box folder, or…
  2. are copied to the host computer’s Downloads folder during an AirDrop session initiated by a nearby iOS device or Mac.
scenario

This is a great example of how OS X enables workgroup productivity!

Preparation

Before creating and activating the workflows for importing from hot folders, there are a couple of things to do in preparation.

Create an Album

Add a new album to your Photos library for receiving photos from the created hot folder.

DO THIS ►Launch Photos and create a new top-level album named: Submitted Photos

Setup File Sharing

If you haven’t already, turn on access to your “Public” and “Drop Box” folders by following the steps outlined on this page.

Activate AirDrop

On the host computer, make sure that WiFi and Bluetooth are both active. Then, open a Finder window and select AirDrop in the window’s sidebar. The host computer will now be ready to receive files wirelessly from other devices.

Creating a Folder Actions Workflow

Step 1: Create a Folder Action Workflow

The Folder Actions feature is conveniently accessed from within the Automator application as a specialized workflow type. So, the first step in creating a hot folder is to create a Folders Action workflow in Automator.

DO THIS ►Launch the Automator application and create a new document by selecting New from the File menu. In the template chooser sheet, select Folder Action as the template type, and click the Choose button to close the sheet.  (⬇ see below ) 

template-picker

A new Folder Actions workflow document will be created. The next step is to indicate which folder is to be designated as the hot folder.

DO THIS ►At the top of workflow window is a popup menu for choosing the folder which will be attached by the workflow file. Select the Other… menu item from the popup menu. (⬇ see below ) 

workflow-banner

DO THIS ►In the forthcoming dialog, navigate to and select the folder that is to be the hot folder (Home > Public > Drop Box). Click the dialog’s Choose button to complete the selection process. (⬇ see below ) 

choose folder dialog

Step 2: Complete and Save the Workflow

The final step in creating the hot folder is to add the Automator action that will process the items placed into the hot folder.

DO THIS ►The first action to add to the workflow will be one for importing image files into Photos. Locate and add the “Import Files into Photos” action to the end of the workflow.

Set the action parameters in the action view to 1) import into an existing album (the one you previously created), 2) skip checking for duplicates, and 3) to move the source files to the trash after completing the import.

(⬇ see below ) 

hot folder workflow

DO THIS ►The final step is save the workflow file and assign it a name. Select Save from the File menu and a naming sheet will appear in the workflow window. Enter a name for the workflow and click the “Save” button to complete.  (⬇ see below ) 

hot folder workflow

The hot folder is now active and the workflow will be automatically executed whenever items are dropped into the host computer’s “Drop Box” folder, from other computers that have mounted the folder over the local network. This is workgroup collaboration in action!

Step 3: Create Another Folder Action Workflow

If you wish to be able to automatically import images transfered to your computer from nearby iOS devices via AirDrop, create a second workflow exactly the same as the previous one EXCEPT set the directory for the hot folder to be the Downloads folder located in your Home folder.

downloads-workflow

Transferring Photos

With the Folder Action workflows created and active, you are now ready to transfer image files to the Photos library on the shared computer.

Copy Using AirDrop

Image files can be transfered to the shared computer via AirDrop from either other Macs or from iOS devices such as iPads and iPhones.

DO THIS ►To transfer image files via AirDrop from another Mac to the host computer, open a Finder window on the client computer with AirDrop selected in the window’s sidebar. Then drag and drop the image file to transfer onto the icon of the host computer that appears in the AirDrop window  (⬇ see below ) 

airdrop-window-client

Once the image files have been dropped onto the AirDrop user icon on the client computer, a transfer approval dialog will appear on the host computer.  (⬇ see below )  Click the “Save” button in the dialog and the image files will be copied to the host computer and the Hot Folder will be triggered, resulting in the transfered images being added to the Photos library.

airdrop-window-host

NOTE: If you plan to leave the host computer unattended and want to have all AirDrop notifications approved automatically, use the Auto-Accept AirDrop Applet linked from the sidebar. The applet requires Notification Center be active on the host computer.

Copy to Public Folder

Image files can be transfered to the shared computer’s “Public” folder from other Macs connected to the shared network.

DO THIS ►Open a new Finder window and select the name of the host computer from the Shared section of the window sidebar. The host’s Public folder with now be displayed in the Finder window:  (⬇ see below ) 

public-folder-connect-01

DO THIS ►Open the “Public” folder, and the Drop Box folder and any other items placed within the Public folder will be displayed.  (⬇ see below ) 

public-folder-connect-02

When you drag image files onto the Drop Box folder icon, the following confirmation dialog will appear  (⬇ see below )  Approve the dialog and the dragged-on files will be copied to the host computer and added to its Photos library.

public-folder-connect-02

Managing Folder Actions

Should you need to disable or remove the folder action from the chosen folder, you can access the Folder Actions Setup Utility using the Finder’s contextual menu.

DO THIS ►Click and hold on the hot folder’s icon while holding down the Control key to summon the Finder’s contextual menu. Select Folder Actions Setup… from the services listed at the bottom of the menu. (⬇ see below )

folder-action-service-menu

The Folder Actions Setup Utility will launch and you can choose to disable or remove the folder action. (⬇ see below )

folder actions setup

NEXT TOPIC: Exporting Media Items

TOPICS

  • Overview
  • Automator Quick-Start

  • Selection & Content
  • Importing Media Items
  • Import Action
  • Tethered Camera
  • Tethered iPhone
  • “Hot Folders”
  • Exporting Media Items
  • Metadata
  • Slideshow Actions

  • Scripting Overview

  • Workflow Recipes
  • Dictation Commands

AUTO-ACCEPT APPLET

AirDrop-Approval

The Auto-Accept AirDrop Applet can be used to automatically approve AirDrop notification alerts in order to automatically download items into the Downloads folder. This applet requires administrative approval for inclusion in the Accessibility Access list on the hosting computer.

DOWNLOAD

RELATED VIDEO

The video from WWDC 2015 Session 306 Supporting the Enterprise with OS X Automation.

DISCLAIMER

THIS WEBSITE IS NOT HOSTED BY APPLE INC.

Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. PHOTOSAUTOMATION.COM assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. PHOTOSAUTOMATION.COM provides this only as a convenience to our users. PHOTOSAUTOMATION.COM has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and PHOTOSAUTOMATION.COM assumes no responsibility in this regard. Please understand that a third-party site is independent from PHOTOSAUTOMATION.COM and that PHOTOSAUTOMATION.COM has no control over the content on that website. Please contact the vendor for additional information.