Task SharePoint - List File
The SharePoint - List file(s) Task returns the files, and optionally folders, on a SharePoint site that match a file filter, using a SharePoint Connection.
The SharePoint Tasks work with SharePoint 2010, 2013 and 2016 on premises, and with SharePoint Online.

This Task uses a SharePoint Connection; see Connection - SharePoint. When a certificate is selected in the Connection, the Task accepts any server certificate, and each run of a SharePoint Task changes TLS handling for the whole Server process.
The Main settings, Flow, On error, Conditions and TimeOut tabs are the same for every Task; see Job - Tasks.
List file(s): Location tab
- Connection: the SharePoint Connection to use. The button next to the list manages Connections
- Source folder: the folder or document library on the SharePoint site, as a server-relative path. The folder button next to the field opens a browser of the site
- Item mask: the names of the items to list. "" matches any characters and "?" one character; separate several masks with ";". The default is ""
- Filter: "Files" (default), "Folders" or "All", the kind of item that matches
- Case sensitive: match Item mask with case
- Include sub folders: also search the folders under Source folder
Variables are resolved in Source folder and Item mask.
List file(s): Date tab
- Newer than and Older than: in each group, select "Don't check" (default), "Created date" or "Modified date", and enter a date or a Variable. An item matches Newer than when it is newer than the date, and Older than when it is older
- The "AND" (default) or "OR" list between the groups: whether an item must match both groups or one of them
Both "Created date" and "Modified date" compare the date with the modified date of the item. With "OR", set at least one of the groups; when neither is set, no item matches.
List file(s): Size tab
- Check if file is smaller than x size and Check if file is larger than x size: match items smaller or larger than the size, in "byte(s)", "kilobyte(s)", "megabyte(s)", "gigabyte(s)" or "terabyte(s)"
- The "AND" (default) or "OR" list between the groups: whether an item must match both checks or one of them
With "OR", every item matches unless Check if file is smaller than x size is checked.
List file(s): Result tab
- Sort (in the Sort result group): sort the matching items by "Full path", "File name", "Modified date", "Created date" or "File size", "Ascending" or "Descending". Sorting by "Full path" makes the Task fail with an error; use another column
- Limit (in the Limit result group): use only the first number of matching items, after sorting. The value can be a Variable
List file(s): Test tab
Click Show filtered files to ask the Server for the items that match the current settings. The number of items found and the time it took are shown.
Output and errors
The output of the Task is one line for each matching item: the name, a tab character and the path. When no item matches, the Task fails with a file-not-found error.