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 / Find folders dynamically
Power Automate
Suggested Answer

Find folders dynamically

(0) ShareShare
ReportReport
Posted on by 2
Hi

We have a OneDrive folder called Reports , inside that folder both files and folders their , and inside those sub folders their is a folders and file , that mean we have sub folders in multiple levels like below

Main Folder -> SubFolder 1
                         SubFolder 2 -> SubFolder 1
                         SubFolder 3      SubFolder 2 -> SubFolder 1
                         file1.xlxs            SubFolder 3       SubFolder 2
                         file2.xlxs

i want a method a go inside those different sub folders level dynamically (Becasue we dont know how many sub folder levels we have) to delete files.
I have the same question (0)
  • Suggested answer
    CU31080729-3 Profile Picture
    500 Moderator on at
    Hi,
     
    You can used get file in folder , for getting file from folder if you don,t know which folder contain file .
    for that get file in folder action having include subfolder option you simply need to enable it its give file from subfolder.
     
     
    Thanks & Regards
    Chetan Ninghot
    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

     
  • Suggested answer
    WK-18020430-0 Profile Picture
    2 on at
    Hi
     
    My question is basically , thing i have one folder contains sub folders in different level like explain in question 
    i want to delete files in side those folders not folder itself , but i don't know how many levels inside sub folders 
    i want to implement recursive check function like below

  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    You don't need to go inside those folders. You can just use Get files in folder -action.


    Then that retrieves a list of all the files in those folders. After that just use Delete file(s) -action to delete all those files (it does not delete the folders, only the files)


    Since you want to delete all the files in those folders then it can be done without a loop.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard