Skip to content

move-content

Move or rename a file or directory.

Category: Write-capable

Parameters

sourcePath (required)
Absolute path of the file or directory to move or rename.
destinationPath (required)
Absolute path of the destination. If the destination's parent directory does not exist, the tool attempts to create it.

Behavior

  • If sourcePath does not exist, the tool returns an error.
  • If something already exists at destinationPath, the tool returns an error — existing content is never overwritten.
  • If the destination parent directory does not exist, the tool tries to create it; an error is returned if that creation fails.
  • Cross-device directory moves are not supported and will return an error.

Output

Moved successfully. on success, or an error message describing why the move could not be completed.