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

Notifications

Announcements

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
    12,982 Super User 2025 Season 2 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
    12,982 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard