Copy a file
copy-fileCopies a file (up to 50 MiB) into an existing folder in Foundry’s data storage, leaving the original in place. Use it to duplicate assets or stage a move before rewriting paths.
Instructions
Copy a file (at most 50 MiB) inside Foundry's data storage into an existing folder. The original stays: Foundry cannot delete files. To move files: find-file-references on the old path, copy-file, then world-rewrite-paths (dryRun first), then find-missing-files. Needs the write switch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The target folder; it must exist | |
| from | Yes | The file to copy, such as "worlds/<world>/old/map.webp" | |
| name | No | New file name; default the same name | |
| dryRun | No | Only check and report what would happen; nothing is written. Needs no write permission. | |
| overwrite | No | Replace a file of the same name in the target folder |