web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How do I loop my flow,...
Power Automate
Unanswered

How do I loop my flow, until all my files are moved?

(1) ShareShare
ReportReport
Posted on by 2

My flow only moves 20 files MAX, how do I revise this flow, so it runs until all files are moved?

 

Screenshot_2-7-2024_141018_make.powerautomate.com.jpeg

Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at

    Is the 20 files some limitation? I don't do much with OneDrive. If it is, I think this may work for you:

    1. Create a Boolean variable and set the default to false, which you can name Completed.
    2. Add a Do until action to your flow and set it to run until the variable Completed is true.
    3. Move the list items in folder and For each actions inside the Do until. 
    4. After the list items in folder action, add a condition. On the left side, use a length expression and convert it to an integer to find how many items are returned from the list items in a folder action. Then set the condition to where the expression is greater than zero (0).
    5. Put the For each action on the yes side of the condition.
    6. On the no side of the condition, add a set variable action and set Completed to true.
    7. I am not sure you will need to do this to prevent errors, but you may need to set the List files in folder action to limit it to 20 items.

    This way, the do until action will process 20 files at a time until it finds no more files in the folder to move.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard