Foreach File/Folder

Iterates through a collection of files/folders.

This activity iterates through a collection of files or folders in OneDrive or SharePoint that matches the user-specified criteria to perform some activities on each of the items in the collection using the Microsoft Graph Microsoft Search API.

Input

Options

  • Folder:String Argument Specifies a folder path within the user-specified file repository to search. When the field is left empty, the root folder is searched instead. This property is not required when the File Repository is set to All.


  • Limit To First: Object Argument Specifies the maximum number of files/folders to return. If the property is left empty, retrieves all the files and folders that match the given criteria. By default, the value is set to 100.

  • Trim Duplicates: If set to True to remove duplicate files from the search results. By default, the value is set to False.

The Microsoft Search API sometimes returns duplicate results (file or folder items). The Trim Duplicates is used for the purpose of removing duplicates from the search results when this property is set to true.

  • What To Return: Specifies whether to return only files or only folders or both. The available options are:

    • Files

    • Folders

    • FilesAndFolders

    By default the value is set to FilesAndFolders.

Repository

  • File Repository: Specifies file repository from which the files/folders are to be retrieved. The available options are :

    • All

    • OneDrive

    • SharePoint

    • Specific Url

    By default the value is set to All.\


  • SharePoint Document Library:String Argument Specifies the document library within the user-specified SharePoint site.\

  • SharePoint Document Library:String Argument Specifies the SharePoint site Url to search in.\

  • Specific Url:String Argument Specifies the URL of a specific location to search in.

Output

Filtration Samples

QueryFilter Expressions

All Word files in the user-specified location

"fileextension:docx"

All Excel and PDF files in the user-specified location

"fileextension:xlsx OR fileextension:pdf"

All files with the name "Sample.xlsx"

"filename:Sample.xlsx"

All Excel files with the word "booking" in the file name

"fileextension:xlsx AND filename:booking"

All Excel files with the word "sample" in the file name

"fileextension:xlsx AND filename:sample"

All files and folders created by "test user"

"createdby: test user"

\

\


Last updated