Move File
Actionarrow.right.doc.on.clipboard
action.move_file
Move or copy a file to a new destination. The source file path comes from the upstream payload (typically {{filePath}} from a File Changed trigger). The destination supports interpolation for dynamic paths. Intermediate directories are created automatically when enabled.
Destructive action
When mode is set to Move with Overwrite enabled (the default), an existing file at the destination path is silently removed before the source replaces it. Pair with a Condition node if you want a non-destructive fallback. Workflows configured this way prompt for confirmation on every arm.
Ports
| Direction | Name | Data Type | Description |
|---|---|---|---|
| Input | Input | Any | Payload with source file path |
| Output | Output | Any | Payload with move/copy result |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| destination | Text | — | Destination path. Supports {{var}} (e.g., {{userInput}}/{{fileName}}). |
| mode | Dropdown | move | Operation mode: Move or Copy |
| overwrite | Boolean | true | Overwrite if file already exists at destination |
| createDirectories | Boolean | true | Create intermediate directories if they do not exist |
Output Variables
| Variable | Type | Description |
|---|---|---|
| sourcePath | String | Original file path |
| destPath | String | New file path after move/copy |
| fileName | String | Name of the file |
| fileSize | Number | File size in bytes |
Safety
Both the source and destination paths are resolved through the standard safety checks before any file is touched. Paths that resolve to protected locations — ~/Library/, ~/.ssh/, ~/.config/, ~/.aws/, and system roots such as /System, /etc, /var, and /usr — are refused, and .. traversal is rejected. A blocked source returns a failure with Refused unsafe move source; a blocked destination is refused the same way.
As of v1.3.0 the source path is validated too, matching Delete File and Move to Trash. Earlier versions validated only the destination, so a Copy could read from a protected location. Everyday moves within Downloads, Desktop, Documents, and your project folders are unaffected.
Example
Sort downloads by file extension: