Hi all! I'm new to Power Automate and am looking for a way to do the following:
File structure: Root Folder > Folders (with different names) > PDF files
I have many subfolders inside my root folder, all named with names of people, and I want to iterate through each subfolder, and copy and paste a specific PDF document into a new folder (to be done for all subfolders).
Restrictions: The documents can only be on OneDrive only, due to my restricted access to certain SharePoint folders that I am working with (but I am still able to download the SharePoint documents and upload them onto my personal OneDrive to work with).
Any help would be great. Thank you!
Hi @v-wenjuan-msft ,
My files are only embedded by one level. Whatever you have suggested works!
Thanks a lot!
Hi @sherwinsherlose ,
I will show you a demo of how to get into subfolders and retrieve files there.
Here's my flow:
1. List files in root folder.
2. Filter array, retrieve objects of folders from outputs of above action.
3. Apply to each, list files in subfolders. and repeat filtering out folders which still embedded with further subfolders.
You have to confirm how further subfolders are embedded. It determines how many loop you need to set to iterate all subfolders.
Community Support Team _ Wenjuan Zou
If this post helps, then please consider Accept it as the solution to help the other members find it.
ankit_singhal
7
Super User 2025 Season 1
Michael E. Gernaey
4
Super User 2025 Season 1
David_MA
2
Super User 2025 Season 1