Templater Parsing Error and tp.file.move

This might help…

I have a Templater script set up to rename(move) yesterday’s Daily Note into a storage folder. The newest version of Templater has a new “script” feature, where you create a template with the script and it runs in the background when Obsidian starts.

I tried using MOVE but it didn’t work and someone else here helped me with the following.

Maybe you can get the new note to move itself, like you wanted, but I tried that and no one knew how to accomplish that double action (create and move).

This is not what you are trying to do, but it might give you some ideas.

```
<%*
const date = tp.date.now(“YYYY-MM-DD”,-1)
const file = tp.file.find_tfile(date)

if (file) {
const name = file.basename
await app.fileManager.renameFile(file, 001 DAILY/PAST/${name}.md)
}
%>
```