Move File

Action arrow.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

DirectionNameData TypeDescription
InputInputAnyPayload with source file path
OutputOutputAnyPayload with move/copy result

Configuration

FieldTypeDefaultDescription
destinationTextDestination path. Supports {{var}} (e.g., {{userInput}}/{{fileName}}).
modeDropdownmoveOperation mode: Move or Copy
overwriteBooleantrueOverwrite if file already exists at destination
createDirectoriesBooleantrueCreate intermediate directories if they do not exist

Output Variables

VariableTypeDescription
sourcePathStringOriginal file path
destPathStringNew file path after move/copy
fileNameStringName of the file
fileSizeNumberFile 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: