Templater parsing error

What I’m trying to do

I’m trying to get a template to work

Things I have tried

Here is the current code:

---
creation date: <% tp.file.creation_date() %>
---
<% await tp.file.rename(tp.date.now("YYMMDD")+"-Untitled")%>

The properties section works fine on it’s own, and the file.rename also works fine on its own, but when I combine them together I get a parsing error.

This is the error in the console:

plugin:templater-obsidian:6 Templater Error: Template parsing error, aborting. 
 Destination file already exists!
K	@	plugin:templater-obsidian:6

I don’t know by heart the syntax.
I can only see:

 Destination file already exists!

So you cannot create another untitled file with the same day as prefix.

1 Like

Ah, ok I didn’t notice that. I already had an untitled file from testing it that I forgot to delete. Thanks for pointing it out!

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