Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Asset → Rename File
AI-generatedSummary
Rename or move a file within the SiYuan workspace by specifying its current path and the desired new path.
Inputs
- Current Path (required) — The current path of the file to rename, which must start with '/'.
- New Path (required) — The new path for the file, which must start with '/'.
Output shape
The operation returns the result of the rename action as provided by the SiYuan API, typically an object indicating success or details of the move operation.
If the operation is successful, a success confirmation is returned. If the paths are invalid or the file does not exist at the current path, an error will be thrown. Both paths must be absolute paths starting with '/'.
Examples
Example 1: Renaming a file from /data/notes/oldFile.txt to /data/notes/newFile.txt
Set 'Current Path' to '/data/notes/oldFile.txt' and 'New Path' to '/data/notes/newFile.txt'.