Page 1 of 1

Filtering development packages (wordpress etc) [RESOLVED]

PostPosted: Sat Sep 15, 2012 7:34 pm
by Flynntargart
Hey guys,

Real quick question:
I have a lot of expansion and sorting rules for my Downloads folder, many of which do funny things if I forget to pause Hazel when I'm downloading WP themes, plugins, etc. Is there a way to exclude a folder from the subfolder rules based on its contents?

I have a few color based ones etc, but if I could make a subfolder rule along the lines of:
Code: Select all
If folder contents include "style.css", "index.php", etc skip running rules
That would be fantastic.

Thoughts?
~ Flynn

Re: Filtering for development packages (wordpress etc)

PostPosted: Sun Sep 16, 2012 10:45 am
by a_freyer
This is a built in feature of Hazel, and your pseudocode is almost exactly correct!

Code: Select all
if (any) of the following conditions are met for (any of its sub-files or folders)
    Name contains index
    Name contains style
    Extension contains css
    Extension contains html

Then
    Ignore


As written, this rule will ignore any folder which contains files whose name contains "index" or "style" or any folder that contains "html" or "css" files. You might want to get a bit more specific with your conditions, but this is the general idea.


Also, make sure to put this as the first rule in the order for your downloads folder. Hazel executes rules sequentially top to bottom, so you need to ignore these folders first.

Re: Filtering for development packages (wordpress etc)

PostPosted: Sun Sep 16, 2012 7:50 pm
by Flynntargart
Sweet!

That's fantastic thank you!

~ Aaron