web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dynamically Point to F...
Power Automate
Suggested Answer

Dynamically Point to Folder with Get Items Action

(0) ShareShare
ReportReport
Posted on by 12

Requirement:
In my Power Automate flow (Instant Flow), when a user selects a file from a subfolder within a SharePoint "Documents" library, I want to retrieve all the files within the same folder as the selected file. This will allow me to iterate over all the files in that folder and perform certain actions (like processing or manipulating the files).

Folder structure example:

  • /SharedDocuments/Folder1/Subfolder1/image1.jpg
  • /SharedDocuments/Folder1/Subfolder1/image2.jpg

So, when a user selects a file (e.g., image1.jpg), I need to fetch all the files in /SharedDocuments/Folder1/Subfolder1/, which in this case would be image1.jpg and image2.jpg.

Struggle:
I’ve been using the "Get Files (Properties only)" action, which requires specifying a library name, but the challenge is that my target folder is a subfolder within the "Documents" library, not directly in the root.

The issue I’m facing is that the "Get Files (Properties only)" action doesn’t allow me to directly specify a subfolder without defining the full path. I can only specify the library, but not the specific subfolder path dynamically based on the selected file’s folder.

As a result, while I can retrieve the properties of the selected file, I’m struggling to figure out how to dynamically get all the files from the same folder as the selected file, iterate over them, and perform actions on each of them.

 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    15,213 Super User 2026 Season 1 on at
    Configure the action like this:

    When you put your cursor in the limit entries to folder field, type a / and it will allow you to choose the folder path under dynamic content from the Get file properties action. Setting "include nested items" to no insures it only gets files in the one folder and not all the subfolders.
  • CU13012033-0 Profile Picture
    12 on at
    Thank you 
  • David_MA Profile Picture
    15,213 Super User 2026 Season 1 on at
    If my post answered your question, @AG-13121726-0, please mark it as answered. This helps others find the answer if they have a similar question, and it also prevents all of us who answer questions from wasting our time from reviewing questions that have been answered.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard