Skip to main content

Copy file

Copy a file into a folder, optionally under a new name. Can replace a file of the same name there by adding the copy as its new version.

Command in the Box toolkit · id ooa.box/copy_file · 8 inputs (3 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
File IDStringYesFile to copy.
Target folder IDStringYesFolder that receives the copy.
New nameStringNoName for the copy. Leave empty to keep the same name.
Access tokenCredentialYesBox access token from the vault. Or leave it empty and choose a connection that signs in, which gets and renews the token.
As userStringNoAct on behalf of this Box user id (needs an admin or service account token). Leave empty to act as yourself.
Endpoint addressStringNohttps://api.box.comBox API address. Leave the default unless your administrator gives you another.
OverwriteBooleanNofalseIf a file of the same name is already in the target folder, upload the copy as a new version of that file instead of failing.
Upload address (URL)StringNohttps://upload.box.comBox upload address. Leave the default unless your administrator gives you another.

Outputs​

OutputTypeWhat it is
file_idStringId of the copy.