Activities
latest
false
Banner background image
Productivity Activities
Last updated May 14, 2024

Find Files And Folders

UiPath.MicrosoftOffice365.Activities.Files.FindFilesAndFolders

Description

Uses the Microsoft Graph Search items and Shared files APIs to find the files, metadata, and/or contents that match the values of your search parameters (Query). By default, this activity searches your connected OneDrive. You have the option to change your search location to a SharePoint site (DriveName and SiteURL).

After performing the search, the activity returns the matching DriveItem objects (First and Results) that you can use as input variables in subsequent activities; almost all of the Excel and Files activities require this as an input variable.

This activity is limited to 200 results. If you're working with more files, use the For Each File/Folder activity.

Note: Find Files and Folders doesn't support the Sites.Selected application permission.

Project compatibility

Windows - Legacy | Windows

Configuration

Properties

Common
  • DisplayName - The display name of the activity. This property supports String variables and string formatted values.
Input
  • Query - Defines the free text search phrase for the files or folders to retrieve. If left blank, the root folder's contents are returned. For a complete list of the supported query parameters, see the drive item Properties in the Microsoft API documentation. This property supports String variables and string formatted values.
  • Subfolder - (Optional) The path of a subfolder in which to search (e.g. SomeFolder or SomeFolder/Another/OneMore). If left blank. the root folder is searched. This property supports String variables and string formatted 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.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.
Output
  • First - The first file or folder matching the specified query. This field supports only DriveItem variables. Required if you plan to use the output data in subsequent activities. The DriveItem contains information about the file including its name, size, type, etc., that you can use in subsequent activities.
  • Results - All files and folders matching the query returned as an array of DriveItems. DriveItems contain info such as filename, type, size, ID, etc., and can be used in subsequent activities. When using the Results DriveItem variable in other activities, specify the item in the array that you want to use (e.g., myFiles(0)).
Sharepoint
  • Drive Name - The name of the drive within OneDrive or SharePoint searched for the indicated files or folders. If this drive exists within SharePoint, Site Url must be specified. If left empty, the search is carried out in the default drive (typically "Documents") of the SharePoint site specified in the Site Url field. This property supports String variables and string formatted values.
  • Site Url - The URL of the SharePoint site searched for the indicated files or folders. Required only when searching in SharePoint. As an example, if you want to search in your SharePoint site's documents, your site URL could be "https://uipath.sharepoint.com/sites/Quickstart" and your Drive Name would be "Documents". This property supports String variables and string formatted values.

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 the Find Files And Folders activity inside the Microsoft Office 365 Scope activity.
  4. Enter values for the Input properties.
  5. Create and enter a DriveItem and DriveItem[] variables for the Output properties.
  6. Run the activity.

    • Your input property values are sent to the SearchItems API.
    • The API returns the DriveItem and DriveItem[] values 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.