Thank you @shabegom, I used the exact same snippet as you provided with the “/PAST/” path as the only change. I used only your snippet in my Daily Note template to ensure it wasn’t something else in the template. This is the console error:
Log.ts:17 Templater Error: Template parsing error, aborting.
Bad template syntax
Invalid or unexpected token
var tR=’’,__l,__lP,include=E.include.bind(E),includeFile=E.includeFile.bind(E)
function layout(p,d){__l=p;__lP=d}
const _prs = [];
tR+=’```\n’
const file = tp.file.find_tfile(tp.date.now(“YYYY-MM-DD”, -1))
if (file) {
await app.vault.rename(file, “/PAST/”+file.basename)
}
tR+=’\n```\n’
const _rst = await Promise.all(_prs);
tR = tR.replace(/rJ2KqXzxQg/g, () => _rst.shift());
if(__l)tR=await includeFile(__l,Object.assign(tp,{body:tR},__lP))
if(cb){cb(null,tR)} return tR