Activities
latest
false
Banner background image
Productivity Activities
Last updated Apr 26, 2024

Copy File or Folder

UiPath.MicrosoftOffice365.Activities.Files.CopyItemConnections

Description

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

Scopes

This activity requires the following scopes:

  • Sites.Read.All
  • Sites.ReadWrite.All

Project compatibility

Windows | Cross-platform

Configuration

  • Microsoft OneDrive & SharePoint connection - The connection for the Microsoft 365 account to use in the activity.
  • File or folder to copy - The specific file or folder to copy. Browse the OneDrive or SharePoint folders and select the file or folder.
    • Folder picker option - Browse the OneDrive or SharePoint folders and select a file or folder. This field accepts IResource input.
    • Use the See more button menu to use a variable or select the Reload Folder Picker option if you've modified your folders and need to retrieve the latest data.

    • Enter Id option:

      • File or folder Id - The ID of the file or folder. To retrieve the ID, open the file in OneDrive Web and retrieve its URL. The ID is encoded in the URL. For example: if the URL is https://yourcompany.sharepoint.com/Doc.aspx?sourcedoc=%7BA1CA7E78-BA59-4DD4-A6B9-5F5BBC37FA85%7D&file=Merge_sheets.xlsx`, the decoded file ID is A1CA7E78-BA59-4DD4-A6B9-5F5BBC37FA85. %7B and %7D are the delimiters around the file ID. This property supports String variables and string formatted values.
      • SharePoint site address - The URL of the SharePoint site that contains the file or folder. Open your SharePoint site in a browser and retrieve the URL, e.g., https://yourCompany.sharepoint.com/sites/Marketing. This property supports String variables and string formatted values.
      • SharePoint document library - The document library within the indicated SharePoint site that contains the file or folder. Open your SharePoint site in a browser, go to the Documents tab, then retrieve the URL, e.g., https://yourCompany.sharepoint.com/sites/Marketing/Shared%20Documents/Forms/AllItems.aspx. This property supports String variables and string formatted values.
    • Enter Url option:

      • File or folder Url - The URL of the file or folder. Open the file or folder in the browser and retrieve its URL. This property supports String variables and string formatted values.
  • Destination folder - The folder where to copy the specified file or folder. If no folder is selected, the default option is the OneDrive root folder. The method to specify the file or folder to be retrieved: Enter Id, Enter Url or Use variable.
    • Folder picker option - Browse the OneDrive or SharePoint folders and select a file or folder. This field accepts IResource input.
    • Enter Id option:
      • Destination folder Id - The ID of the destination folder. This property supports String variables and string formatted values.
      • Destination SharePoint site address - The Url of a destination SharePoint site. This property supports String variables and string formatted values.
      • Select the Reload Email Folder Picker option if you've modified your email folders and need to retrieve the latest data.

        Use the See more button menu to use a variable or select the Reload Folder Picker option if you've modified your folders and need to retrieve the latest data.

    • Enter Url option:
      • Destination folder Url - The Url of the destination folder. This property supports String variables and string formatted values.
  • New name - An optional new name for the copied file or folder. If left blank, the copy keeps its original name. This property supports String variables and string formatted values.
  • If file or folder already exists - What to do if file/folder already exists. Choose one of the available options from the dropdown menu:
    • Don't replace - Fails if an existing item is found.
    • Auto rename - Auto renames the new item by appending a number.
    • Replace - Replaces the existing item.
      Note: Folders can’t be replaced.
Additional options

Output

  • File or folder - The copied file or folder. Automatically generated output variable. You can use it as it is or save it with a different name. You can use this in other activities.

Example



See also:
  • Description
  • Project compatibility
  • Configuration
  • Example

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.