Activities
latest
false
Banner background image
Productivity Activities
Last updated 2024年3月27日

Copy File/Folder

UiPath.MicrosoftOffice365.Activities.Files.CopyItem

Description

Uses the Microsoft Graph Copy item API to create a copy of a file or folder and add it to the same or a new parent folder (Destination folder).

After the copied item is added to the Destination folder, the activity returns a DriveItem object (Reference as) that you can use as an input variable in subsequent activities.

Project compatibility

Windows - Legacy | Windows

Configuration

In the Body of the Activity
  • File or folder to copy - The file or folder to copy as a DriveItem. This object can be retrieved using the Find Files And Folders activity. Use the output property variable from the Find Files and Folders (First or Results). If you're using the Results output property from the Find Files and Folders activity, specify the item in the array that you want to use (e.g., myWorkbooks(0)).
  • Destination folder - The directory to which this item is copied as a DriveItem. This object can be retrieved using the Find Files And Folders activity. If left empty, the user's root folder is used. Use the output property variable from the Find Files and Folders (First or Results). If you're using the Results output property from the Find Files and Folders activity, specify the item in the array that you want to use (e.g., myWorkbooks(0)).
  • New name (optional) - The name of this item after it is copied. If you copy a file, include the file extension that you want to apply to the copy (e.g., "CopyExcelQuickstart.xlsx"). This property supports String variables and string formatted values.
Properties Panel
Common
  • DisplayName - The display name of the activity in the Designer panel. This property supports String variables and string formatted values.
Input
  • See the options in the body of the activity.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.
Options
  • Account - The ID or User Principal Name for the user who owns the OneDrive. This parameter must be set for ApplicationIDandSecret and ApplicationIDAndCertificate authentication types.
Output

Reference as - The name used to refer to this folder in other activities.

How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

  1. Complete the Setup steps.
  2. Add the Microsoft Office 365 Scope activity to your project.
  3. Add an activity or run an external process that outputs a DriveItem object (e.g., Find Files and Folders, Create Workbook, Copy File/Folder).
  4. Add the Copy File/Folder activity inside the Microsoft Office 365 Scope activity.
  5. Enter values for the Input properties.
  6. Create and enter a DriveItem variable for your Output property.
  7. Run the activity.

    • Your input property values are sent to the CopyDriveItem API.
    • The API returns the DriveItem value to your output property variable.
  • Description
  • Project compatibility
  • Configuration
  • How it works

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.