Skip to content

move-file ​

Move or rename a file, directory, or symlink, removing it from its original location.

When to use it ​

Use this node to publish a prepared artifact to its final location. Choose copy-file when you need the source to remain.

Example ​

rattish
Rattish: 1

Workflow:
  name: Move a resource

Node step:
  type: move-file
  source-path: notes/input.txt
  destination-path: reports/moved-input.txt
  overwrite: false
  finish: pass

Create the source before preflight, or give the node needs on the step that creates it. The destination policy defaults to creating parents and refusing overwrite. Successful output includes both resolved paths and the resource kind.

Moving is a side effect: a later node failure does not automatically put the resource back. Review paths and preserve a recovery copy when appropriate.

Configuration ​

Configuration fields use hyphens. These are the node-specific fields; shared execution fields apply separately.

FieldTypeRequired / defaultMeaning
source-pathstringRequiredSource resource path.
destination-pathstringRequiredDestination resource path.
create-dirsbooleantrueAllow creation of missing destination parents.
overwritebooleanfalseAllow replacing an existing destination.

Inputs and output ​

This node has no declared input ports. Configure its authored fields directly.

Successful output fields use these exact selector names:

FieldValue type
source_pathstring
destination_pathstring
source_namestring
destination_namestring
destination_directorystring
path_kindfile, directory, symlink

For example, refer to node.step.output.source_path from a compatible downstream binding.

Preflight and limits ​

The source and its parent must permit moving, and the destination must satisfy the directory/overwrite policy. When the node has needs, preflight skips the existence check because an upstream step may create the source earlier in the run; the node then reports a missing source when it runs. Invalid containment or type combinations fail.

Use Raticode rattish check and Raticode rattish preflight before choosing to run the example. The installed contract is available through Raticode rattish docs --format json.

Continue with Node reference, Routes and joins, or Runs and approvals.