cp
Copy files or directories with dry-run preview and overwrite protection. Use --allow_overwrite to replace existing files.
Instructions
Copy files and directories with dry-run and overwrite protection. Destructive to destination: creates new copies on the filesystem. Overwrite protection enabled by default — use --allow_overwrite to replace existing files. Use --dry_run to preview the operation safely. Returns JSON with source and destination paths. Use to duplicate files or directories. Not for moving files — use 'mv' to relocate without copying. Not for setting permissions on copy — use 'install'. See also 'mv', 'install'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allow_overwrite | No | Allow replacing/merging destination. | |
| destination | Yes | Destination path. | |
| dry_run | No | Report operation without changing files. | |
| parents | No | Create missing parent directories. | |
| recursive | No | Copy directories recursively. | |
| source | Yes | Source path. |