Rules based on folder content

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

Moderator: Mr_Noodle

Rules based on folder content Thu Oct 08, 2015 8:36 pm • by tomhayes
Hi guys,

Having spent the best part of an evening creating an arsenal of Hazel rules, I'm massively impressed! I've got Hazel to carry out most of the basic housekeeping tasks I have to perform on the regular.

I'm just struggling with one little thing that you might be able to help me out with...

Basically, I want to create a rule that does the following:

if folder contents is just audio files OR just audio files and images BUT not just images, then move the folder to x location

Does that make sense? I'm sure it's quite simple to achieve but I feel like I'm just missing something...

Thanks in advance :)

*EDIT* Had to make this a little more complex, worked out the initial problem :)

Tom
tomhayes
 
Posts: 2
Joined: Thu Oct 08, 2015 8:24 pm

Re: Rules based on folder content Fri Oct 09, 2015 1:31 pm • by Mr_Noodle
Yikes, this one is going to be tricky. You're going to have to play with this but to start you off, try something like:
Code: Select all
If (any) are met
    If (all) are met for (all of its sub-files)
        Kind is Music
    If (all) are met for (the current file or folder)
        If (any) are met for (all of its sub-files)
            Kind is Music
            Kind is Image
        If (all) are met for (any of its sub-files)
            Kind is Music

Hopefully these folders aren't too big as I can see the above being a bit expensive to evaluate.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rules based on folder content Sat Oct 10, 2015 8:55 am • by tomhayes
Thanks a lot for taking the time to get back to me!

May be I'm being a little over ambitious but that's a great starting point, thank you!
tomhayes
 
Posts: 2
Joined: Thu Oct 08, 2015 8:24 pm


Return to Support