Page 1 of 1
Complex rules needed

Posted:
Fri May 03, 2013 12:15 pm
by Kabeyun
Can't seem to find a way to set up complex rules requiring both ANY and ALL behaviors.
Example: If a file appears in the "Downloads" folder that is either .dmg OR .pkg/.mpkg, AND the filename does not contain the text string xxxxx, then move the file to the "Installers" folder.
Creative ideas, or will this become a feature request?
Thanks.
Re: Complex rules needed

Posted:
Fri May 03, 2013 3:22 pm
by a_freyer
You're missing just one piece - holding alt to nest conditions. When you hold OPT/ALT the [+] (add condition) turns into a (...) so that you can nest conditions.
Remember, you can drag rules around.
For you, it'll look like this:
- Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
if (any) of the following conditions are met for (the file or folder being processed):
extension is dmg
extension is pkg
extension is mpkg
name does not contain (xxxxxx)
Do the following to the matched file or folder:
move to folder "installers"
Re: Complex rules needed

Posted:
Fri May 03, 2013 4:02 pm
by Kabeyun
A handy secret! Nice. Thanks for the help.
Re: Complex rules needed

Posted:
Fri May 03, 2013 5:00 pm
by Kabeyun
Doesn't work. Let me guess: I have to upgrade from 2.x to 3.x. *sigh*
Re: Complex rules needed

Posted:
Fri May 03, 2013 5:12 pm
by a_freyer
Well worth it, my friend. I no longer have 2.x, so I do not recall what would be the best way for you to accomplish this task.
Re: Complex rules needed

Posted:
Fri May 03, 2013 5:20 pm
by Kabeyun
Took the dive, works as you said. Well, it looks nicer anyway. Haven't read the change log yet. Not a power user, so this was probably the only time I'll need v3.x. Then again, Hazel has a knack for finding reasons to use it. Thx again.