Apply Finder tag to subfolders based on contents

I am trying out Hazel for the first time, after having been pointed to it from a question I asked here:
https://apple.stackexchange.com/questio ... on-content
as I am looking for a way to automatically apply a given Finder tag to a folder based on its contents.
I read up on how to process subfolders here, https://www.noodlesoft.com/manual/hazel ... ubfolders/
however, I'm unsure how to construct a rule that checks those subfolders for containing files.
This is the scenario:
I have a archive of files stored in several subfolders, like this, where the folders ending on A, B, C etc. are folders that contain a number of different files.
Archive
|
|—— 2015-09-09
| |——2015-09-09-A
| |——2015-09-09-B
| |——2015-09-09-C
|—— 2015-09-10
| |——2015-09-10-A
| |——2015-09-10-B
| |——2015-09-10-C
Now what I want to accomplish is to apply Finder tag "X" to all folders (on the level of those that end on A, B, C, etc.) that contain one or more files with file extension "Y".
So essentially constructing a rule that applies to all folders within the folder "Archive", automatically tagging them based on whether or not they contain specific files. Any way to do that with Hazel?
https://apple.stackexchange.com/questio ... on-content
as I am looking for a way to automatically apply a given Finder tag to a folder based on its contents.
I read up on how to process subfolders here, https://www.noodlesoft.com/manual/hazel ... ubfolders/
however, I'm unsure how to construct a rule that checks those subfolders for containing files.
This is the scenario:
I have a archive of files stored in several subfolders, like this, where the folders ending on A, B, C etc. are folders that contain a number of different files.
Archive
|
|—— 2015-09-09
| |——2015-09-09-A
| |——2015-09-09-B
| |——2015-09-09-C
|—— 2015-09-10
| |——2015-09-10-A
| |——2015-09-10-B
| |——2015-09-10-C
Now what I want to accomplish is to apply Finder tag "X" to all folders (on the level of those that end on A, B, C, etc.) that contain one or more files with file extension "Y".
So essentially constructing a rule that applies to all folders within the folder "Archive", automatically tagging them based on whether or not they contain specific files. Any way to do that with Hazel?