cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frixel
Level: Powered On

move files with a condition

I have the flow below but now it moves all the files.
Only the files that start with processed may be moved.
and .... if there are any files that do not have a processed name, another mail must be sent.

How do I solve that?

 

 

flow2.png

10 REPLIES 10
Highlighted
Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

You could use Filter array to filter files whose file names begin with processed.

Then use length() function to get the number of files that meet the criteria.

If the result is greater than 0, the eligible file is moved to the specified folder; if the result is equal to 0, the message is sent.

 

Image reference:36.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
frixel
Level: Powered On

Re: move files with a condition

Thanks for your reply but i have a error.

i can`t  get it in there.

 

flow.png

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

Please click Edit in advanced mode.

 

Image reference:

 

45.PNG46.PNG

 

Best Regards,

 

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
frixel
Level: Powered On

Re: move files with a condition

error but i don`t no why.

 

flow3.png

 

flow4.png

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

Please use item()['Id'] instead of item()['ID'].

 

Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
frixel
Level: Powered On

Re: move files with a condition

I keep getting an error message. I have adjusted the item()['ID'] to item()['id']

 

flow5.png

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

Please configure Move or rename a file action in Apply to each.

 

Image reference:

11.PNG

 

Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
frixel
Level: Powered On

Re: move files with a condition

oke, i understand and the flow runs.

But just 1 file and not al the files in the folder 😞

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

That's related to the logic of Condition you configured, or that there is only one file in your Folder that matches the expectations.

 

The logic of the Flow configuration is no problem.

 

Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
frixel
Level: Powered On

Re: move files with a condition

oke, thank you. but what must i changed so all the files in that folder must be replaced?

the other files now wil be leave in there.also when the the flow runs again.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,004)