Skip to content
Actions for Obsidian icon Home Actions for Obsidian 2024.2.1 › Actions

Actions for Obsidian › Actions › Rename/Move File

Renames or moves a file via the file system (not the Obsidian API).

Returns the path of the renamed/moved file relative to the vault root.

Parameters

Vault

The vault to work in.

Type: Vault reference

File Path

The path of the file, relative to the vault root.

Type: Text

Rename or Move

Moving a file will change its parent folder while keeping the original name unchanged. If a file with that name already exists in the destination folder, it will be overwritten.

Renaming allows you to change either parent folder or name, or both, in one go. If a file already exists at the specified destination, it will be overwritten.

Options:

  • Rename
  • Move

Destination Folder

The folder to move the file into, relative from your vault root.

Type: Text

New File Path

Specify the desired new path (including the file name), relative from the vault root.

Type: Text

Create Folders

When enabled, then the action will automatically create any necessary folder structure. If disabled, no folders will be created.

Type: Boolean (YES/NO)

Return Value

Text

Examples

You want to change a file's name from photo.jpg to photo 1.jpeg: Rename file photo.jpg to photo 1.jpeg

You want to change a file's name from photo.jpg to photo 1.jpeg and simultaneously move it to another folder: Rename file /folder 1/photo.jpg to /folder 2/photo 1.jpeg

You want to change a file's parent folder: Move file /folder 1/photo.jpg to /folder 2