Is it possible to just list all sub-folder name in a folder? #2219
-
I would like to use dataview to list a sub-folder name in a note, is there any way to do it ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
What kind of a sub-folder name do you want to list? The path & folder of the current note is availabe in If you want to list all existing sub-folders of a given folder, it can kind of be done if there are files in those folders. Then you could do a query to list all notes in the current folder and sub-folders, and then strip out the sub-folder part of your text and use that to group your entries by those sub-folders. Does that make sense? The following query shows 10 of the sub-folders to the
You'll of course needs to change the
The output of these queries in my test vault is as follows: |
Beta Was this translation helpful? Give feedback.
-
Thanks, it works well. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
What kind of a sub-folder name do you want to list? The path & folder of the current note is availabe in
file.path
andfile.folder
, and you could manipulate these using stuff likesplit()
.If you want to list all existing sub-folders of a given folder, it can kind of be done if there are files in those folders. Then you could do a query to list all notes in the current folder and sub-folders, and then strip out the sub-folder part of your text and use that to group your entries by those sub-folders. Does that make sense?
The following query shows 10 of the sub-folders to the
ForumStuff
folder in my test vault: