Copy a file
copy_fileCopies any Google Drive file to a new location, returning the new file's ID. Optionally rename or specify a destination folder; original remains unchanged.
Instructions
Copies a file and returns the new copy's metadata (a fresh fileId — the original is untouched). name renames the copy (default: same name as the original, NOT 'Copy of ...'); parent_id places it in a folder (default: same parent as the original for My Drive files). Works on Google-native files (Docs/Sheets/Slides) and binaries alike, but folders cannot be copied — recreate the tree with create_folder + copy_file per file. Comments and permissions are not copied. Each retry would create another copy, so after an ambiguous failure check with search_files before calling again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the copy (defaults to the original's name). | |
| file_id | Yes | The file id — the long id from the Drive URL (drive.google.com/file/d/<fileId> or docs.google.com/.../d/<fileId>/edit) or from search_files/get_file output. Folders and shared-drive items are files too. | |
| parent_id | No | Folder for the copy (defaults to the original's parent). |