Create a folder with the note's name

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

You may find it easier to use one of the folder note plugins like “AidenLX’s Folder Note” or “Folder Notes”.

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