Skip to main content

Notifications

Power Automate - General Discussion
Answered

Distribute excel files to different SharePoint folders

(0) ShareShare
ReportReport
Posted on by 39

HI,

 

I have a SharePoint folder(Original Files) which has around ~49 excel files(this count may change every week) and i have another folder named (Distributed Files) and with in that i have 5 sub folders A, B, C, D and E.

 

I am trying to automate this to distribute the files in SharePoint folder(Original Files) to the 5 sub folders A, B, C, D and E in (Distributed Files) equally.

 

Example: 

SharePoint folder(Original Files)  - 49 files.

SharePoint folder(Distributed Files):

A - 10 files

B - 10 files

C - 10 files

D- 10 files

E - 9 files.

 

Thanks.

  • Verified answer
    Re: Distribute excel files to different SharePoint folders

    Hi @PowerMani ,

     

    Refer to following process

    vwenjuanmsft_0-1685936197619.png

    For remaining part of files, divide them into chunks and repeat the "Apply to each" to move files by order.

    Here are functions to group them into groups of 10:

     

    take(outputs('Get_files_(properties_only)')?['body/value'],10)
    skip(take(outputs('Get_files_(properties_only)')?['body/value'],20),10)
    skip(take(outputs('Get_files_(properties_only)')?['body/value'], 20), 10)
    skip(take(outputs('Get_files_(properties_only)')?['body/value'], 40), 30)
    skip(outputs('Get_files_(properties_only)')?['body/value'],40)

     

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard