Path
Use template.path
to read/write note path:
This code block will create a template at path 202507291347.md
:
```pochoir-js
const { today } = await template.import("pochoir:date");
template.path.basename = today("YYYYMMDDHHmm");
```
Alternatively, you can use $.path property.
Full example
// Set file name (without extension)
template.path.basename = "Daily";
// Set file extension
template.path.extension = "md";
// Set file name (with extension)
template.path.name = "Daily.md";
// Set folder name
template.path.parent = "dailies";
// Set full path
template.path.path = "dailies/Daily.md";
Example
Create unique note
```pochoir-js
const { today } = await template.import("pochoir:date");
template.path.basename = today("YYYYMMDDHHmm");
template.path.parent = "inbox";
template.$properties.insertTo("tags", "inbox");
template.properties.date = today("YYYY-MM-DD");
```
Outputs a note at inbox/202507291347.md
:
---
date: 2025-07-29
tags:
- inbox
---