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

Automate import to iphoto naming the event.

Hi every one.


I can automate any new photos i put into my "photos" folder so that they import straight into iphoto fine. The only problem is that when it imports them it creates an unnamed folder or "event" instead of a named event.


The example is.


Test folder is dragged into "photo" folder.

This is then imported into iphoto

iphoto then displays those images as an event called "untitled"


How can i have it so that the event is named after the folder which ("test") which i have put into my "photos" folder?


Any help would really be appreciated. 2nd day of owning my first mac and loving it. Really want to make use of some of these really decent features.


thanks

Wes

MacBook Pro (13-inch, Mid 2012), OS X Mountain Lion (10.8.2)

Posted on Oct 9, 2012 11:27 AM

Reply
Question marked as Best reply

Posted on Oct 10, 2012 10:20 AM

Hi,


If you use Automator :

You don't have the folder name , because the "Import ..." action import files not folder.



Here is a solution :

If you use a folder action, the first action should be the "Run AppleScript" action.

Cut all the code in the action.

Copy/paste this text in the action.

--------------------------------

onrun {input, parameters}

tell application "iPhoto"

import from input

end tell

return input

endrun

6 replies
Question marked as Best reply

Oct 10, 2012 10:20 AM in response to wesm87

Hi,


If you use Automator :

You don't have the folder name , because the "Import ..." action import files not folder.



Here is a solution :

If you use a folder action, the first action should be the "Run AppleScript" action.

Cut all the code in the action.

Copy/paste this text in the action.

--------------------------------

onrun {input, parameters}

tell application "iPhoto"

import from input

end tell

return input

endrun

Nov 15, 2012 7:44 PM in response to Jacques Rioux

This was a great solution - Thank you! I wonder if you have a script, or addition to that script, that can delete the photos I drag into the folder (that are getting imported with the above-provided script)? I tried to just add another script (which I got by googling, finding someone successfully setting script to delete the contents of a folder) following in the workflow in automator, but I guess there isn't enough delay to allow the import to finish, and I get an error.


Is there something that could be built into the script you provided? Thank you for your help! (Sorry, I am a very basic user!)

Nov 16, 2012 9:49 AM in response to abeerxx

Hi,


abeerxx wrote:


T I wonder if you have a script, or addition to that script, that can delete the photos I drag into the folder (that are getting imported with the above-provided script)?


Yes :


on run {input, parameters}
      tell application "iPhoto"
            import from input
            repeat while importing is true -- waiting
                  delay 5
            end repeat
      end tell
      tell application "Finder" to delete input -- move items to the Trash
end run

Automate import to iphoto naming the event.

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