Actions14
File → Copy
AI-generatedSummary
Copy a file by specifying its File ID, optionally renaming the copy and setting its parent reference location.
Inputs
- File ID (required) — The ID of the file to copy.
- Additional Fields — Optional parameters, including a new name for the copied file. If no name is provided, the copy will retain the original file's name.
- Parent Reference — Reference information to specify the parent drive or folder where the copied file will be created, such as Drive ID, Drive Type, Site ID, folder Path, or other item identifiers.
Output shape
a single JSON object containing a location URL to track the copy operation progress
The operation returns an object with a 'location' property indicating the URL to monitor the asynchronous copy process. The copy operation is performed asynchronously by the Microsoft OneDrive API, and the result does not include the copied file metadata directly.
Examples
Example 1: Copy a file with the original name in the same or different folder by providing its File ID.
Set 'File ID' to the source file's ID. Leave 'Additional Fields' name empty to keep the original name.
Example 2: Copy a file and rename the copy into a specific folder.
Set 'File ID' to the source file's ID. In 'Additional Fields', set 'Name' to the desired new filename. In 'Parent Reference', specify the target folder (e.g., by Drive ID and Path).