Number of Files in Folders and Subfolders

Hi,
I want to set a tag if the folder contains no files, but empty folders.
My folders have subfolders, and in the subfolders there are document files (or not).
My rule should tag the folder „green“ if there is no document within the folder structure available.
And set it to „red“ if there is any kind of document in a subfolder of the folder.
How can I solve this problem?
I want to set a tag if the folder contains no files, but empty folders.
My folders have subfolders, and in the subfolders there are document files (or not).
My rule should tag the folder „green“ if there is no document within the folder structure available.
And set it to „red“ if there is any kind of document in a subfolder of the folder.
How can I solve this problem?