Find Files and Folders
You can select this activity to search files, folders, metadata, or content that matches your search criteria (query). By default, this activity searches the connected OneDrive. However, you can change your search location to a SharePoint site by using the SharePoint Input property. (DriveName and SiteURL).
This table lists the properties for the activity.
Property Type | Property Name | Data type | Description |
---|---|---|---|
Common | Continue on error | Boolean | The option to continue the RPA flow even if the activity fails. This check box is selected by default. |
Input | Query | <String> | The free text search phrase to retrieve files or folders. The contents of the root folder are returned if no value is specified in this field. See, https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#properties for a complete list of supported query parameters. |
Subfolder | <String> | The sub folder location where the files or folders must be searched. For example, AnyFolder or Folder/SubFolder/OneMore. The files or folders are searched in the root folder if the value in this field is not specified. | |
Misc | DisplayName | String | The name to be displayed for the activity. |
Output | Item | <OneDriveItem> | The first file or folder matching the specified query. The output can be used in subsequent activities. The OneDriveItem contains information about the file such the name, size or type that can be used in the subsequent activities. |
Results | <OneDriveItem[]> | All files and folders matching the query returned as an array of OneDriveItems. When using the Results OneDriveItem variable in other activities, you must specify the item in the array that you want to use. For example, myFiles(0)). | |
Response Code | Int32 | Response code for the activity. Possible values:
|
|
Sharepoint Input | Drive Name | <String> | The name of the drive, in OneDrive or SharePoint, searched for the indicated files or folders. If this drive exists within SharePoint, Site Url must be specified. If no value in this field, the search is carried out in the default drive (typically "Documents") of the SharePoint site specified in the Site Url field. |
Site URL | <String> | The URL of the SharePoint site where the indicated files or folders are searched. This value is required only when searching for files and folders in SharePoint. |