Files

Move File

Move or copy a file to a new place, building the folders on the way if they are not there.

action.move_file
FILEMove File

At a glance

Does
Moves or copies one file to a destination you template
Emits
sourcePath, destPath, fileName, fileSize, moved
Works with
Local folders, iCloud Drive and the other cloud mounts

Set it up

The source comes from filePath on the incoming payload — typically from a File Changed or Directory Changed trigger. You supply the Destination, which takes {{variable}} so the path can be built from what arrived.

The inspector for a Move File node. Destination, mode, and the two toggles.
The inspector for a Move File node. Destination, mode, and the two toggles.

Mode chooses move or copy. Overwrite replaces a file already sitting at the destination — never a folder: if a folder is there the move fails rather than clobbering it. Create Directories makes any missing folders in the destination path.

Both the source and the destination are checked before anything is touched. A path inside ~/Library, ~/.ssh, ~/.config, ~/.aws, /etc, /var, /usr or /System is refused, and .. traversal is rejected. iCloud Drive and the other cloud folders are carved out and work normally.

Configure

FieldDefaultWhat it does
Destination—Where the file should end up. Supports {{variable}}.
ModeMoveMove takes the file; Copy leaves the original.
Overwrite ExistingOnReplace a file already at the destination.
Create DirectoriesOnMake any missing folders in the destination path.
Allow FoldersOffLet the source be a folder instead of a single file.

Output

Every key is available downstream as {{key}}.

KeyTypeValue
sourcePathStringWhere the file came from
destPathFileWhere it is now
fileNameStringName of the file
fileSizeNumberSize in bytes
movedBooleanTrue on a real move or copy; false for a no-op

Example: sort downloads by kind

Directory Changed watches ~/Downloads. Move File sends each new file to a folder named after its fileType.

Two nodes. A watched folder, and the file landing in a sorted subfolder.
Two nodes. A watched folder, and the file landing in a sorted subfolder.

Paste this into the Flow Builder to get the same flow:

Watch my Downloads folder and move each new file into ~/Downloads/{{fileType}}, creating the folder if it doesn't exist.

Good to know

Allow Folders widens the blast radius. These nodes act on one file: a folder as the path is refused until you turn Allow Folders on, and then the whole tree goes with it. Your home folder and its top-level folders — Desktop, Downloads, Documents, Pictures, Movies, Music — are never a source, toggle or not; a file inside one is ordinary. A package like .app counts as a file either way.

Move with Overwrite replaces the file at the destination. It is removed before the source lands, and it does not go to the Trash. A flow set that way asks for confirmation every time it is armed.

Staying in the same folder? Use Rename File. Rename File is the same operation pointed at the source's own directory, with a name pipeline instead of a path field.