Hello everyone, I want to list every note inside a folder, specifically every note inside a sub-folder contained in the folder where current note is located (better see the example).
- My Daily Notes
| - 2023
| - 2022
| - 2021
- Daily Notes index.md
Inside Daily notes index.md I want to have something like this:
### 2023
Some toughts ....
#### Notes of this year
\```dataview
LIST
WHERE contains(file.folder,this.file.folder+"\2023")
\```
###2022
Same as previous
Problem is that WHERE contains(file.folder,this.file.folder+"\2023")
does not work as intended, I would just like to use current file path + subdirectory on it.
Hope the problem is clear. Thank’s.
Edit: I found a work-around, but it has a problem: it does not exclude folders, see:
WHERE contains(file.folder,join(this.file.folder,"/2023")) and
!contains(file.folder,join(this.file.folder,"/2023/Resources")) and
!contains(file.folder,join(this.file.folder,"/2023/Monthly Notes")) and
file.name != "2023"
If I leave only contains(file.folder,join(this.file.folder,"/2023"))
it works, but if I add the other 2 filters it does not display any note.
Edit2: ok I was wrong, neither contains(file.folder,join(this.file.folder,"/2023"))
works as intended, so I’m back to start.