Templator automate file name increments.

Hi guys I’ve search for an answer but can’t find one.

My current automation for file names is;

<% tp.file.rename("Lecture - " + tp.date.now("DD-MMM-Y_hh.mm.ss")) %>

The minutes and seconds help give it a unique name, when I only had the dd/mm/yy it would only let me create a new file once a day.

I want to increment file names Like ‘Lecture 1, Lecture 2, Lecture 3’ so it keeps counting up automatically.

Any solutions?