Daily notes: Allow formatting file location (subfolders based on year/month)

Use case or problem

I’m keeping a daily journal and my files are in a structure like this: journal/YYYY/MM/YYYY-MM-DD.md. Currently, I’m using a custom bash script to create the daily file via Alfred, but it would be awesome to have Obsidian’s daily notes plugin support this natively.

Proposed solution

Allow formatting the “New file location” with year and month. Also the folder would have to be created if needed in case it’s the first entry for the current month. (Currently, when the folder specified in “New file location” does not exist, there will be an error.)

Current workaround (optional)

Using a bash script to create the appropriate file for the day and open it in Obsidian.

Related feature requests (optional)


I thought maybe Periodic Notes plugin was the answer, but I’m not sure if it works with folders in the same way you are describing.

See Periodic Note’s Readme, under the FAQ question “How do I use a variable in the folder path?”: GitHub - liamcain/obsidian-periodic-notes: Create/manage your daily, weekly, and monthly notes in Obsidian

I’m a bit late here, but I found out you can do this by putting the folder pattern in the “Date format” instead of under “New file location” - the format will get expanded, appended to the new file location, and all directories between the two will be created.

For example, here’s my config:
Date format: YYYY/MM/YYYY-MM-DD dd
New file location: logs/

Which created logs/2022/11/2022-11-17 Th today.

The same thing also works for unique notes by putting the date-dependent path in the “Unique prefix format” configuration.


1 Like