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 / Power automate to copy...
Power Automate
Unanswered

Power automate to copy files from one drive to different share point folders in different sites based on filename content

(0) ShareShare
ReportReport
Posted on by 50

Hi all, i am trying to build a flow to copy excel files from one drive to share point folders which are located in different share point sub sites.

I am trying to use switch function but all files are going into only one folder in a sub site that i included under default branch of switch control.

Please see below the flow.

BW FLOW 1.PNG

 BW FLOW 2.PNG

 

Regards,

PW

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,143 on at

    Hi @RV_KONDRA 

     

    The data returned is encoded.

    Try the following.

    RezaDorrani_0-1593204928621.png

     

    The Name property from "Get file metadata" will have your file name so you can use it in Switch.

    Note: the Name will also have the file extension.

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

    Thanks,
    Reza Dorrani, MVP
    YouTube
    Twitter

     

  • RV_KONDRA Profile Picture
    50 on at

    Hi Riza, thanks for the response. But still, it is copying all files into default branch of the switch control.

    Below is how i tried in switch control.

    BW FLOW 3.PNG

     

  • RezaDorrani Profile Picture
    12,143 on at

    @RV_KONDRA 

     

    When the flow is running, you can check the value of the compose action.

    See if that value exactly matches one of the cases that you have provided.

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

    Thanks,
    Reza Dorrani, MVP
    YouTube
    Twitter

  • RV_KONDRA Profile Picture
    50 on at

    Hi Reza, you are right the excel reports in one drive have below file names. So is it we need to get compose with current date-name of the company - report name.xlsxBW FLOW 4.PNG

     

     

     

  • RV_KONDRA Profile Picture
    50 on at

    Hi Reza, i think it is reading the correct value. Please see below screen shot.

     

    BW FLOW 5.PNG

     

  • RezaDorrani Profile Picture
    12,143 on at

    @RV_KONDRA 

     

    That is correct, you would need an exact match

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

    Thanks,
    Reza Dorrani, MVP
    YouTube
    Twitter

  • RV_KONDRA Profile Picture
    50 on at

    Hi Reza, i got for each company 4 to five reports with different dates and report names something like below. So it we need to create 4 to 5 compose expressions?

     

    BW FLOW 6.PNG

     

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