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

For Each File or Folder

UiPath.MicrosoftOffice365.Activities.Files.ForEachFileFolderConnections

Description

Iterates through a list of files and folders from OneDrive or SharePoint.

Add the activities to repeat inside For Each File/Folder and, when you configure the activities, select Use Variable > CurrentItem from the Plus button menu to indicate that you want to repeat the actions for each item in the iteration.

Note: This activity uses pagination for processing large numbers of items and mitigating performance issues.

Project compatibility

Windows | Cross-platform

Configuration

  • Microsoft OneDrive & SharePoint - The connection for the Office 365 account to use in the activity.
  • In location - The location where to search for files and folders. This field accepts IResource input.
Additional options

Options

  • Limit to first - The maximum number of files and folder to return. If left blank, there is no limit. This field supports Int32 variables and Int32 values.
  • What to return - The types of results to return: both files and folders, only files, only folders.
  • Trim duplicates - Boolean value. Set to True to remove duplicate files and folders from the search results.
  • Simple search - The query text used to search for files and folders across several fields (such as file name or file content). This property supports String variables and string formatted values. Use the Plusdocs image button menu to switch to Advanced search.
  • Advanced search - An advanced search criteria defined to filter the files and folders. This advanced search is not supported for personal Microsoft accounts. Advanced search uses the Filter builder to configure the search criteria.

    • Include subfolders - Boolean value. Set to True to expand the search to all subfolders in the selected location.
Filtering limitations
  • Filtering by File extension in the Filter builder might not work for extensions such as .avi, .svg, .gif, .ico, .jpeg, .jpg, .mov, .mp3, .mp4, .ogg, .png, .rtf, .tiff, .wav, .webm, .webp, or .wmv.
  • Filtering by Last modified by or Shared with user might return incomplete results.
  • The Graph API trims special characters from the beginning of a searched value. For example, if you search for "_Sorted", the API returns all files/folders whose name contains the word "Sorted", omitting the "_" character.
  • When iterating through files in the OneDrive root folder using Advanced search without any filters configured and even when Include subfolders is False, the activity may return all OneDrive files instead of just the OneDrive root folder’s files only.

Output

  • Number of items processed - The number of items processed by the activity.
Body

The body of the activity that stores other activities used in the automation.

Note:

Batching API calls is supported for the following activities when used inside the For each:

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.