Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automator "Get Folder Content" in app package (photos app)

Hi,

is there any chance to use folder Actions ("Get Folder Contents") inside an app package?


Problem: Since "El Capitan" the folder containing the pictures inside the photostream disappeared. I used to copy new photos inside that certain folder (/Library/Application Support/iLifeAssetManagement/assets/Sub) to a temp-folder and used the auto-Import feature of lightroom. Now all the "master" photos are stored inside the Photos Library.photoslibrary. "Get Folder Contents" doesnt work any longer even if I create an alias pointing inside the app package.


Is there any solution to copy new pictures from the photos app library to another folder?


Kind regards,

Kai

MacBook Pro (Retina, 15-inch, Mid 2014), OS X El Capitan (10.11), null

Posted on Oct 5, 2015 6:21 AM

Reply
6 replies

Oct 5, 2015 6:43 AM in response to KaiH

You can use find in an Automator Run Shell Script Action.

This will find files created in the last month(-newerct '1 month ago') and copy to the Desktop (-exec cp {} ~/Desktop \;)


User uploaded file


find ~/Pictures/Photos\ Library.photoslibrary/Masters -type f -newerct '1 month ago' -exec cp {} ~/Desktop \;


Take a look at "man find" to see other options available.

Oct 5, 2015 6:45 AM in response to Tony T1

Hi Tony,

thanks for your reply! I will give it a try. I have never used Shell Scripts before and Need to hae a closer look at it. I think I need to trigger the script manually then. I hope it will work inside the library/package.


Kind regards

Kai


PS: Just thought about it... I want to copy only new files added to the iCloud photos. The Shell Script might find all the files added last month.

Oct 5, 2015 6:58 AM in response to KaiH

I just edited my post to add copying to the Desktop the files found. You can change the destination to the temp folder you use.

You can save the Automator Workflow as a Folder Action (when you open Automator, select Folder Action)



>KaiH wrote:

>PS: Just thought about it... I want to copy only new files added to the iCloud photos.

>The Shell Script might find all the files added last month.


There are many options with find's -newer (i.e. you can copy files newer than another file)

I don't use iCloud, but if you can access the files in iCloud from the Finder (see: http://www.macworld.com/article/2310807/how-to-access-icloud-files-from-your-mac .html), then this may be a way to copy only the files added to iPhoto that are newer than the file latest files in iCloud

Oct 5, 2015 7:38 AM in response to Tony T1

hmmm..

I am not sure if this solves my problem. The photos are not in a folder but in the photos library/package. If they were in a folder I could use my "old" folder action:


  1. Folder Action receives files and folders added to XYZ
  2. Get Folder Contents
  3. Copy Finder Items


This worked perfectly in the backgroud and instantaneously I want to do exactly the same but since "El Capitan" the files are "hidden" inside the library/package.


Need to find some tutorials how to use Shell scripts with automator and how everything might work..

Oct 5, 2015 7:56 AM in response to KaiH

There are other ways to trigger a script to be run.

You can use a launchd "watch path" to do this. When a file is added to the selected directory, a script will be triggered.

You can create the launchd .plist manually, but the easiest way is with the GUI interface Lingon ($10) https://www.peterborgapps.com/lingon/

(If you decide to use Lingon, buy Lingon X from the website, not from the App store (the website explains the differences)

Oct 5, 2015 10:53 AM in response to Tony T1

Dear Tony,

thank you very much for your support. It seems to me that my problem is just a little bit too complicated for me to solve even with your support. I will use the detour over dropbox and the auto-upload function to get the files to my mac and into lightroom with auto-import.

Maybe there will be a better solution in the future to access the files that are already on my mac via iCloud photo..


Kind regards

Kai

Automator "Get Folder Content" in app package (photos app)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.