Nested Conditions

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Nested Conditions Thu Jan 24, 2013 1:49 pm • by mediteran
I searched here in the forum for "nested conditions" but couldn't find any solution.

Task:

1st criteria:
Date added is Today
OR
Date last edited is Today

AND

2nd criteria:
Name starts with ABC
OR
Name starts with DEF
OR
Name starts with GHI


If one of the 1st criterias AND one of the 2nd criterias are matching, copy/move the file to its destination.
Best regards from Croatia ;-)
Ralf
mediteran
 
Posts: 37
Joined: Sun Dec 25, 2011 1:08 pm

Re: Nested Conditions Thu Jan 24, 2013 1:56 pm • by a_freyer
Hold option in the rule view and you will see the [+] turn to a [. . .]; this is how you add nested conditions.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Nested Conditions Fri Jan 25, 2013 2:38 pm • by mediteran
Thanks, I know this. Maybe, I didn't point out clearly where is the problem. I'm testing all possible combinations of "all" and "any", but never come to the desired result.

Did anybody solve a situation with nested conditions where are:

(1st condition OR 2nd condition)
AND
(3rd condition OR 3rd condition)
?
Best regards from Croatia ;-)
Ralf
mediteran
 
Posts: 37
Joined: Sun Dec 25, 2011 1:08 pm

Re: Nested Conditions Fri Jan 25, 2013 2:42 pm • by a_freyer
Same answer, just nest for two or more levels of logic.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Nested Conditions Fri Jan 25, 2013 3:30 pm • by mediteran
OK, let's give it another try. I posted a screenshot of the existing rule which doesn't work:

Image

Now in words:

If the Date Added is Today OR the Date Last Modified is Today
AND
the Name starts with Punta OR the Name starts with Aurora

then copy the file(s) to the Folder YYY.

I hope this makes it a bit clearer. I think that I used "all" and "any" at the wrong places.
Best regards from Croatia ;-)
Ralf
mediteran
 
Posts: 37
Joined: Sun Dec 25, 2011 1:08 pm

Re: Nested Conditions Fri Jan 25, 2013 3:34 pm • by a_freyer
I must say, your logic appears correct in the screenshot. Do you have an example file that you would expect to match that is not?

EDIT 1 - I duplicated this rule and am testing now.

EDIT 2 - I have successfully implemented the exact rule you have above: (using touch to modify the access and modification times):

Punta - test.txt (modified today, added yesterday) MATCH
Aurora - test.txt (modified today, added yesterday)MATCH
Punta - test.txt (modified today, added today) MATCH
Aurora - test.txt (modified today, added today)MATCH
Punta - test.txt (modified yesterday, added today) MATCH
Aurora - test.txt (modified yesterday, added today)MATCH
Punta - test.txt (modified yesterday, added yesterday) NO MATCH
Aurora - test.txt (modified yesterday, added yesterday)NO MATCH

NotPunta - test.txt (modified today, added yesterday) NO MATCH
NotAurora - test.txt (modified today, added yesterday)NO MATCH
NotPunta - test.txt (modified today, added today) NO MATCH
NotAurora - test.txt (modified today, added today)NO MATCH
NotPunta - test.txt (modified yesterday, added today) NO MATCH
NotAurora - test.txt (modified yesterday, added today)NO MATCH
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Nested Conditions Fri Jan 25, 2013 3:47 pm • by mediteran
Yes, I have an example: Punta 309.jpg

I can take it out of the folder, and move it back. Or open in Photoshop, and modify it. Nothing happens. With two single rules, one for "Date Added" and one for "Date Last Modified", everything works fine.

[edit]: Sorry, didn't see your edited post before. Need to make up my mind ;) I'll come back.
Best regards from Croatia ;-)
Ralf
mediteran
 
Posts: 37
Joined: Sun Dec 25, 2011 1:08 pm

Re: Nested Conditions Fri Jan 25, 2013 3:50 pm • by a_freyer
Are you checking the dates within the matching preview window?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Nested Conditions Fri Jan 25, 2013 4:04 pm • by mediteran
Good point, didn't think about this at all. But I did it now. Everything looks fine, but no reaction.

Image
Best regards from Croatia ;-)
Ralf
mediteran
 
Posts: 37
Joined: Sun Dec 25, 2011 1:08 pm

Re: Nested Conditions Fri Jan 25, 2013 4:08 pm • by a_freyer
So you're saying that the files are not being copied?

First, make sure that Hazel is copying where you think it is copying. Verify your directory structure.
Second, check to see if you are deleting duplicates or re-naming the file. (info within each individual COPY action)
Third, check Hazel logs to see if there are errors (are the files open?)
Fourth, add a notification at the end of the copy moves so you can see at least if Hazel thinks the actions have been sequentially activated.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Nested Conditions Sun Jan 27, 2013 7:43 am • by mediteran
Hi a_freyer,

thanks for your confirmation that my rules & conditions are OK. I restarted my Mac the next morning and everything was working fine, without making any changes to my Hazel settings or anything else.

I suppose that the issue is closely related to "Excessive RAM Usage" which I described in this thread: http://www.noodlesoft.com/forums/viewtopic.php?f=2&t=1941
Best regards from Croatia ;-)
Ralf
mediteran
 
Posts: 37
Joined: Sun Dec 25, 2011 1:08 pm


Return to Support