Mark Folders containing files, not only Subfolders

Hello forum!
I want to create a rule that allows me to mark folders that contain files at the end of the folder hierarchy. Example:
Folder1/Subfolder1/File.xxx (Folder1 contains just Subfolder1, no Files) -> Folder1 and Subfolder1 should be marked
Folder2/Subfolder2/ (Subfolder is empty, contains no Subfolders/Files) -> Folder2 and Subfolder2 should not be marked
The "Sub-file/Folder count" rule does not work here. Neither does the "Size" rule, because folders can have a size > 0, even if they do not contain any visible file.
Is that possible using Hazel?
Thank you!
I want to create a rule that allows me to mark folders that contain files at the end of the folder hierarchy. Example:
Folder1/Subfolder1/File.xxx (Folder1 contains just Subfolder1, no Files) -> Folder1 and Subfolder1 should be marked
Folder2/Subfolder2/ (Subfolder is empty, contains no Subfolders/Files) -> Folder2 and Subfolder2 should not be marked
The "Sub-file/Folder count" rule does not work here. Neither does the "Size" rule, because folders can have a size > 0, even if they do not contain any visible file.
Is that possible using Hazel?
Thank you!