Dataview: get folder list without duplicates

Things I have tried

I want to use a shortcut to create a new file in an already existing folder and have templater show me all folders via tp.system.suggester. Meanwhile I know that I can use a dataview array as source. I also managed to display all folders:

const dv = this.app.plugins.plugins["dataview"].api
const filesArray = dv.pages().folder
filesArray.map(path => {
})

What I’m trying to do

This list contains many duplicates. How can I generate a folder list without duplicates for tp.system.suggester?
Or maybe there is a completely different way to have a folder selected in the templater dialog?

I have now found a simple solution to my problem: the addon “Obsidian Advanced New File” creates a new file in a selected folder with a file name also prompted in a dialog. This is exactly what I had been missing until now.

By the way, I had noticed a small bug: As soon as the profile folder (as a replacement for .obsidian) contains a hyphen or underscore, no more addons can be installed.

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