> [!warning]
> #2023/07/30 時点では[[Obsidian]]のコマンド `Make a copy of the current file` があるため、この方法は不要。
[[Enhance Copy Note]]の機能を[[Templater]]を使って実現する方法。
```js
<%*
const f = app.workspace.getActiveFile()
await tp.file.create_new(
tp.file.content,
`${f.basename}--copied.md`,
true,
f.parent
)
app.commands.executeCommandById("workspace:edit-file-title")
%>
```