How do I exclude results from a subfolder in a table when using Dataview (Plugin)?

Hey, noobie here. I’m using the plugin Dataview and I’m searching through the notes in a folder to make a table. This folder also happens to include a sub-folder that I don’t want to include. Ive tried using “!contains” and “-”, but havn’t had any success.

I believe I can think of a way to make this work using tags, but I’m hoping for a cleaner way to do this that I can just throw in a template instead of having to create new tags each time.


Here’s an example query where I’m excluding every file in the “Scratch” directory:

TABLE file.path
WHERE !startswith(file.path, "Scratch/")

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.