Hello ! Thanks in advance to those who will try to help me
What I’m trying to do
I try to create a folder with the note’s name, and to move the note into the same folder using the plugin “Templater”.
Things I have tried
<%*
const dir = "folder/folder/something/"
if (!tp.file.exists(dir)) {
await this.app.vault.createFolder(dir)
}
await tp.file.move(dir + tp.file.title)
%>
Unfortunately, I have to manually enter the folder name in the first line. Isn’t there a function to create a folder with the name of the note?
If anyone has a solution, I’d love to hear about it! Hope it helps others