copy
Copy files or directories to new locations with atomic writes, permission preservation, and recursive directory structure handling. Preview changes with dry run or handle locked files on Windows.
Instructions
Copies a file or directory to a new location. File copy uses atomic write (temp file + rename) and preserves permissions. Directory copy recreates the full directory structure recursively. Use dry_run=true to preview what would be copied without doing it. On Windows, handles locked files (running executables, loaded DLLs) by renaming the locked file aside before replacing it. Use overwrite=true when updating a running binary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Absolute path to the source file or directory,required | |
| destination | Yes | Absolute path to the destination,required | |
| overwrite | No | Overwrite existing destination. Default: false | |
| dry_run | No | Preview what would be copied without doing it (default false) |