Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting multiple files from sub folders in Power Automate

Hi Everyone.


I'm new to this so if i make a mistake please let me know!

I'm trying to get a file from multiple different folders, by this I mean their is one file (not all the same file) in multiple different folders. These folders are on a desktop. I would like to copy them all over to a teams folder. 


I was wondering if theirs a way to get the correct paths for all the files? i tried the 'list files in folder' but that only seems to work with one folder. Multiple folders causes an error.


The error to the best of my knowledge is due to the fact it lists the folders, but doesn't go inside to get file, it only goes 1 layer deep. if their a way to do this? i've been racking my brain for hours trying to sort this out.


Any help would be greatly! appreciated




Frequent Visitor

You want to import files into Teams? You can drag files into teams to upload them, or you can upload them in the SharePoint that is connected to your team. Also, If you want to use Flow, you need to upload the files to a onedrive. Flow cannot connect to your desktop.

Not applicable

Sorry I must not have wrote it out correctly. This is a task i was given for work, and it's connecting to a remote server running windows.

The task was for me to create a automated process to copy multiple folders or the files inside of them and move them to either teams or SharePoint.

So far I've established a connection to the server via a gateway, and this is allowing me to see the folders, my problem is that i cannot copy the folders directly so my next plan was to copy the files inside all of the fodlers (currently 30 but can go as high as 137) first goal is simply copying the as many as possible, i have an idea to get around any potential limit, as long as it's above 1.


I've noticed i can copy files from an individual folder using get file content, and multiple files in a folder using a loop around it. My issue is getting files from multiple folders, as opposed to multiple files in none folder


Not sure if that makes any more sense?

Frequent Visitor

It does, and a virtual server I have no experience on, so I can't help you with that. Maybe you can write several flows? I hope someone else has more knowledge 🙂 

Not applicable

Ahh that's alright, no worries. thanks for viewing though! Hopefully someone will know if this is even possible 😊

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,899)