Labels and folders content

Is it possible to add label to folder according to its content ?
I want to color all folders witch have file "test.txt" on it.

Not dynamically/automatically, no.