How can I monitor the files in a directory, but not its subdirectories?


CBFS Filter supports passthrough rules to make tasks like this one possible. Passthrough rules instruct CBFS Filter that it should not intercept requests made against matching files/directories (that would otherwise be intercepted due to other rules).

So, to monitor files in (e.g.) C:\WatchFiles but not its subdirectories, call AddFilterRule to add a standard filter rule for C:\WatchFiles\*.*, and then call AddPassthroughRule to add a passthrough rule for C:\WatchFiles\*\?*. This will exclude all files in subdirectories from filtering.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@callback.com.