activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 21, 2024

CopyFile

Copies a file to the specified destination folder in OneDrive or SharePoint.

Namespace: UiPath.MicrosoftOffice365.Activities.Api

Assembly: UiPath.MicrosoftOffice365.Activities.Api (in UiPath.MicrosoftOffice365.Activities.Api.dll)

Syntax

IFile CopyFile(
	IFile file,
	IFolder destination = null,
	string newName = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Fail
)IFile CopyFile(
	IFile file,
	IFolder destination = null,
	string newName = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Fail
)

Parameters

file IFile
The file to copy.
destination IFolder (Optional)
The destination folder where to copy the specified file. If not specified, it defaults to OneDrive root folder.
newName String (Optional)
An optional name given to the copied file. If left blank, the copy retains the original name.
conflictBehavior ConflictBehavior (Optional)
What is the expected behavior when a file with the same name already exists in the destination folder.

Return value

IFile - The copied file.
  • Syntax
  • Parameters
  • Return value

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.