Tag a folder based on contents?

Here's what I am trying to achieve...
I have a folder (we'll call it "Parent") of folders ("Child A", "Child B" and "Child C"). I'd like a rule that crawls the child folders and tags them if the folder contains a file with a specific extension. Is this possible?
For extra credit... is it possible for the rule to run on the folders within the child folders?
I've wracked my head trying to get this sorted out. Any help is appreciated.
/fc
I have a folder (we'll call it "Parent") of folders ("Child A", "Child B" and "Child C"). I'd like a rule that crawls the child folders and tags them if the folder contains a file with a specific extension. Is this possible?
For extra credit... is it possible for the rule to run on the folders within the child folders?
I've wracked my head trying to get this sorted out. Any help is appreciated.
/fc