Hi Fellow Obsidian Friends,
Nothing really special, just a snippet that might help other folks working on their own custom folder structures, project homepages, and Dataview queries.
I found a similar topic (list all canvas files), but what I needed was specifically listing all canvas files from a specific folder.
It took me an hour to make Dataview’s dataviewjs query type do what I asked:
```dataviewjs
const moodFolderFiles = app.vault.getFiles()
.filter( (file) => {
return (
file.path.includes('MOODBOARDS') &&
file.path.includes('.canvas')
)
})
.map( (file) => {
const matches = file.name.match(/([^/]+)\.canvas$/)
return dv.fileLink(file.name, false, (matches ? matches[1] : file.name))
});
dv.list(dv.array(moodFolderFiles).sort(l => l.display, 'desc'));
```
If you have some ideas, suggestions on improving the snippet, I welcome all shares.