Create a rule for autoimport only new photos to iPhoto

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Hello am a new mac user and hazel user so please be patience if my questions sounds stupid:

I have a folder "Photo" where i have all my photos in different folders (cars, design, logos etc) i want some of does folders to be automatically update when i open iPhoto.
I try to create a rule, but being new to mac i didn't do a good job, i don't understand how to create a good rule for what i need, the best i did is to import them to iPhoto
but each time i add a new photo to one of the folders, the iPhoto ask me if i want to overwrite the older file.

What i need is a tutorial for setting up a action/rule that does this:
-watch a folder with sub folder for new photos
-only import this one to iPhoto

Can anybody help me on this problem ?
Thanks in advance...
gatekeeper79
 
Posts: 1
Joined: Mon Apr 06, 2009 1:51 am

If I understand correctly, you want a ruleset like the following:

If Kind is Folder, Run rule on folder contents
If Date Added is after Date Last Matched, Import into iPhoto

The first rule tells Hazel to go into subfolders. The second rule matches newly added files and imports them into iPhoto. I'm not sure if that's exactly what you want but try that as a base and see how it goes.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote: If Kind is Folder, Run rule on folder contents
If Date Added is after Date Last Matched, Import into iPhoto

The second rule matches newly added files and imports them into iPhoto.


Out of curiosity, it would seem the "Date Last Matched" rule wouldn't apply here since the newly-added files technically have yet to be matched at all. Or does "Date Last Matched" apply to the folder, and not to the individual items in the folder?

Also, does "Date Last Matched" apply to the files being matched to any Hazel rule, or just the rules within the specific set for the current folder you are tweaking?
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

If a file was never matched then it's date last matched is effectively sometime in the distant past such that any date you come up with will come after it. So any non-blank date added will come after date last matched if the file never matched a rule.

Date last matched applies to whatever the rule is processing. Files and folders alike. It's no different than any of the other timestamps that file or folder can have, in that respsect. And it only applies to rules within the current ruleset. It is probably a bad idea having Hazel overlap folders as you may get some weird side effects as the two rulesets fight over a file. In the very least, it will become less predictable.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Makes sense. I do have some potentially overlapping rules, as sometimes I will move files to a monthly archive, and then further process them with Hazel for 'aging' color labels. So, they have been matched by Hazel for the initial move, and then further match in the archive folder as they 'age'.
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

If you are careful, it can work but keep in mind they are somewhat independent of eachother so the different rules can step on eachother, so to speak. Just be prepared for side effects depending on timing.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion