Move File
A Move File node moves each incoming file to one or more destinations and removes it from its original location. Use it to deliver finished files to a partner folder or a downstream system, to route uploads out of an inbound folder so they are not processed twice, or to archive files after the nodes before it have processed them.
Move File accepts only file items, because a data item has no file to move. Destinations can be folders on your site, on a Remote Server, or in a Child Site.
Settings
Each destination has a Destination Type, Move to a specific folder or Move relative to the Automation's source path, and a Destination Folder Path that accepts tokens and templates. A path that ends with / keeps each file's name and its folder structure below the trigger's folder path, and a path that does not end with / renames the file.
Under Advanced Settings:
- Destination Path Replacement replaces exact text in the resolved destination path after templates and tokens are applied, using Text to Find in Destination Path and Replace With. Matching is case-sensitive.
- Overwrite the Existing Files with New Ones has one option, Always overwrite files with matching names, because a move makes no size comparison. It is off by default, and with it off the move fails for a file whose name already exists at the destination.
- Flatten Folders writes every file directly in the destination folder instead of recreating the source folder structure below it.
- Exclude Pattern removes matching files from the items the node moves, using the same syntax as the trigger's Exclude Pattern.
- Ignore Locked Folders applies when a destination is inside a folder protected by the Lock Subfolders Folder Setting. It is off by default.
With several destinations, the node copies each file to every destination except the last and then moves it to the last, so the file is written to every destination before the original is removed. Overwriting applies to every destination, including the ones written as copies, and when overwriting is on, each destination on a Remote Server needs delete permission there, for the copies as well as for the final move.
What the Next Node Receives
Move File passes on one file item for each destination, referring to the file at its new path. The original path no longer exists, so a node on a parallel branch that still refers to it fails with a not-found error. Place the Move File node after the branches that read the original.
Errors
A file that no longer exists when the node runs fails with a not-found error, and a destination where a file of the same name already exists fails the move for that file unless overwriting is on. Error Handling rules on the node determine what happens to a failed item.