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 / Extract PDF Files from...
Power Automate
Answered

Extract PDF Files from Subfolders and Copy into New Folder

(0) ShareShare
ReportReport
Posted on by 6

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!

Categories:
I have the same question (0)
  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @sherwinsherlose ,

     

    I will show you a demo of how to get into subfolders and retrieve files there.

    Here's my flow:

    vwenjuanmsft_0-1684392700236.png

     

    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.

  • sherwinsherlose Profile Picture
    6 on at

    Hi @v-wenjuan-msft ,

     

    My files are only embedded by one level. Whatever you have suggested works!

     

    Thanks a lot!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard