How to Get Files in a Folder in Power Automate Desktop

preview_player
Показать описание
This tutorial shows how to work with files and folders in Microsoft Power Automate Desktop. You'll learn to get all files in a folder, iterate through them and move/copy them to a new folder. Bonus: Custom object work, which is key for Power Automate Desktop developers.

VIDEOS FOR YOU:

POWER AUTOMATE DESKTOP GROUPS:
- Join my network with 4200+ Automation/RPA developers, where we solve Automation/RPA problems, network and help each other upgrade our careers. It's free!

FOLLOW ME:

0:00 Intro
Working with files and folders is easy in Microsoft Power Automate Desktop. We'll create a dynamic solution that works with all file types.

0:57 Get File Names to a List
With a Get files in folder action we get the files into a list and can work with this list.

3:19 For Each File Loop
Our files are stored in a list, and with a For each action we iterate through each file so that we can work with them one by one.

4:28 Working the File Types, aka Extensions
When comparing the file types, we ensure that all our extension values are converted into lowercase names. Similarly, we remove the dot at the start to create nice folders and a log.

7:20 Custom Object Work
A Custom Object in Power Automate Desktop can be seen as a dictionary with key/value pairs. We can then add our file types to the custom object as the keys and then do a count for the values. Finally, we use an If action condition to create folders and sort the files. This solution will work with any file, and it's best practice.

#powerautomate #powerplatform #office365
Рекомендации по теме
Комментарии
Автор

I made a Discord, so we can network and solve RPA problems together 😊

andersjensenorg
Автор

I have no words. One more excellent video.Thank you Anders Jensen.

ALVINMAN
Автор

Thank you so much Anders, this video is a life-saver.

SQLAgent
Автор

Thank you for sharing. I'm learning a lot from your videos. Won my LIKE.

oricchannel
Автор

Appreciated your time your content 🔥 damn helpful as an Beginner in RPA

suraj_singh
Автор

Mr Jensen, I wish to give a very heart felt thank you for all the time and effort that you put into making this amazingly interesting content- I love it and your calm and thought out explanations- thank you, thank you 🙏🏻

thinkhelpservice
Автор

Thanks for the video! Can you demonstrate how to move Microsoft Lists file attachments to a specific SharePoint folder according to the characters contained in the file name? For example, a Microsoft Lists attachment has a file name that contains the word "blue" and another that contains the word "green." The SharePoint library has a folder titled "Blue" and a folder titled "Green." How would you use Power Automate to extract the Microsoft List attachments and place them in the corresponding SharePoint folders? Thanks!

melissaw
Автор

Hi Anders, please can you do a video how to get a list of files in folders in PAD, but also extract file attributes such as creation date? I've been trying for ages and cannot work it. I understand it can be done with a for each loop and CMD

BrumCraft
Автор

Great video!!, but I'm new to rpa, doesn't it work in power automate cloud?

Sophia
Автор

Thank you Anders for your content. Here is a question that may be an interesting topic. I have a list of file names and I wish to compare that to the file names in a folder and then only move those specific files out into another folder. But I can't seem to write a flow where the file names will loop through the list of file names. I would think this might be a common use case. How could you compare files in a folder to files in a list so you can dynam, ically move only certain file names around? I hope that is an interesting question for people and many thanks for the desktop content!

northernboy
Автор

Thank you for making these, I'm a complete newbie to PAD but your tutorials are helping me automate so many tasks. But I am having issues with paths to folders, if I browse for the folder in a step the flow works fine but when I set the path as a variable I get an error saying can't retrieve the list of files in a folder - when I go deeper into the error I see this ... Can't retrieve list of files in folder . ---> System.ArgumentException: The path is not of a legal form . I have compared the path in both cases and they look exactly the same, any idea what could be causing this? Thank you

kerry-gljo
Автор

I have created a flow which is basically saving attachments in the specific folder using power automate desktop.
I am facing a challenge my flow is saving signature's jpg file as well as png files.I want to exclude the jpg as well as png file.could you please make a video for this problem.

amitpandey-qlog
Автор

Hi, I want to ask, if i have xlsx file, and xls file, then error arise after follow your tutorial at around 14:44, the program says "FileCount doesnt have properti 'xls'", at set variable inside IF, how to resolve this?

FYI: inside array FileCount, already available XLSX filename

unknown-qycp
Автор

How to Apply Actions to multiple excel files?

So I want to apply a similar action to multiple excel files on the same folder. I'm unable to find a way to do it.



I am using the Desktop version. I am manually opening each files using the Launch Excel option and doing it one by one.



I want to apply the same action to multiple files using the shortest way but I can't figure it out.

markstones
Автор

Hi Jenson am creating a folder and storing the downloaded files in my target folder now am trying to read the most recent file from my target folder but its not working kindly can u help me to sort it out? AM also set a variable and trying to get the first file(latest one with 0 index but i cant be able to open it)

engineerjunaid
Автор

Make a video on how we can build Regex Tutorial

suraj_singh
Автор

Bonjour,
Je vous remercie pour toutes vos leçons.
Sauf erreur de ma part, il y a une erreur sur l'algorithme, j'ai suivi les étapes une par une, Power Automate me déplace des fichiers dans le mauvais dossiers, Word avec Excel et PowerPoint avec Texte et ainsi de suite.
Merci d'essayer sur des fichiers avec des noms différents et revenir vers moi.
Cordialement

rachidelbargui
Автор

Make a video on Regex Tutorial At Power Automate Desktop

suraj_singh
Автор

What if there are duplicates, how can we identify it?

bukolashodiposhodipo