# Power Automate: List Files in a SharePoint Folder

> For the full documentation index, see https://250highstreet.com/llms.txt

> Use Get files (properties only) with Limit Entries to Folder to list files in one SharePoint folder. Filters, sub-folders, and the Apply to each loop.

Use the SharePoint action "Get files (properties only)", set Library Name, and pick the folder in "Limit Entries to Folder". The action returns one entry per file or folder, and an Apply to each loop handles them one by one.

## How do you list the files in one folder?

## Which action should you use?

The SharePoint connector has three ways to list files. They return different data.

## Why does the flow return files from sub-folders?

![Two folder trees: with Include Nested Items set to true the flow returns 6 entries including the Archive sub-folder files; set to false it returns 4](/img/fig-power-automate-list-files-in-sharepoint-folder.svg)

The default reads every sub-folder. Set Include Nested Items to false to stop at the folder you picked.

"Include Nested Items" defaults to true. The action then returns entries from every sub-folder under the folder you picked.

Set Include Nested Items to false to read only the top level of that folder.

## How do you filter and sort the list?

The action accepts three ODATA settings:

1.  Filter Query: restricts the entries, for example Status eq 'Approved'.
2.  Order By: sets the order, for example Created desc.
3.  Top Count: caps the number of entries. The default is all of them.

## Example: files created in the last 7 days

Build the cutoff date in a Compose step, then pass it to the Filter Query.

## What if the filter or the list looks wrong?

Check the internal column name, not the display name. A renamed column keeps its old internal name. The guide to the [Get items filter query](/guides/power-automate-get-items-filter-query-not-working/) covers the same fix.

If you expect many files, read the guide on why [Get items returns only 100](/guides/power-automate-get-items-only-returns-100/).

To read the data inside the loop, [Filter array](/guides/power-automate-filter-array/) trims a list you already have.

## Want help with a file flow?

If you would rather not wire this up yourself, 250 High Street LLC builds SharePoint and Power Automate flows for small teams, all remote. A tracker costs \$5,000 and takes 2 weeks, and you can see [finished examples](/portfolio/) before the free first call.

## FAQ

### Does Get files (properties only) return the file content?

No. It returns column values. Use "Get file content" with the file identifier to read the file itself.

### Can I list files from a folder in another site?

Yes. Set Site Address to that site, then pick its library and folder. The flow owner needs access to it.

### Why is my Apply to each loop empty?

The folder has no matching entries, or the Filter Query removed them. Test with the filter cleared.

## Sources

- [SharePoint connector reference (Microsoft Learn)](https://learn.microsoft.com/en-us/connectors/sharepointonline/)

## Related guides

- [Power Automate Get items filter query returns nothing: how to fix it](/guides/power-automate-get-items-filter-query-not-working/)
- [Power Automate Get items stops at 100 rows: how to get them all](/guides/power-automate-get-items-only-returns-100/)
- [Power Automate Filter Array: Steps and Examples](/guides/power-automate-filter-array/)
- [Power Automate: Move a File in SharePoint (Move File Action)](/guides/power-automate-move-file-sharepoint/)

Source: https://250highstreet.com/guides/power-automate-list-files-in-sharepoint-folder/
