Listfile has the option to define a File Filter and a Path Filter. From your explanation I would expect that you need to define the Path Filter.
In the Path Filter you can place a regular expression (in Java syntax).
For regex there are a lot of resources available, I think something like this should do the trick:
(?!(B|C)).*
- Dennis Jaheruddin
If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.