Apply tags to files in different subfolders

Hi,
I have a folder, call it Books, with many subfolders:
I want to add a specific tag, e.g. "Chess" to all files in the Chess folder, "Physics" to all files in the Physics folder and so on. How can I do this state-of-the-art without creating an individual rule for each subfolder?
Thanks.
I have a folder, call it Books, with many subfolders:
- Anatomy
Chess
Physics
History
…
I want to add a specific tag, e.g. "Chess" to all files in the Chess folder, "Physics" to all files in the Physics folder and so on. How can I do this state-of-the-art without creating an individual rule for each subfolder?
Thanks.