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 can I copy files t...
Power Automate
Unanswered

How can I copy files to individual folders based on different keyword contained in both (file name and folder name)

(0) ShareShare
ReportReport
Posted on by 6

Hi All,

Can you please help with suggestions how can I setup a PowerAutomate flow to help me with the following Archiving issue:

I want to create a flow where different files are copied to different folders automatically, based on a Keyword contained in both (file name and folder name). 

1. I am filing .pdf of .doc or .xls files to different folder names, i.e.:

                   - files named    "295OE005 - MCB.pdf" and "295OE005 - SINC.pdf" are archived in folder named "295OE005 - AM                               Sydney"   AND

                   - files named    "294AS003 - BI.pdf" and "294AS003 - SINC.pdf" are archived in folder named "294AS003 OP                                        Melbourne" 

                   - and so on, for hundreds of key words and folders alike.

Is there any setup of PowerAutomate or AI to allow me to have this automatic flow (copying individual files from 1 folder TO multiple folders based on the keyword contained in both - file name and Folder name ?

Attached visual sample of what I described above.

thank you

 

Categories:
I have the same question (0)
  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @AlexAlex81 ,

    Do you want the files to be copied to folders with the same name with file names?

    I made a test for your reference.

    In my scene, both the file name and the folder name contain '-', I use split() to split them with '-' and put the same first half into the same folder.

    vdezhilimsft_0-1669183222096.png

     

    vdezhilimsft_1-1669183222097.png

     

    vdezhilimsft_2-1669183222097.png

     

    vdezhilimsft_3-1669183222098.png

     

    vdezhilimsft_4-1669183222099.png

     

    vdezhilimsft_5-1669183222100.png

     

    Best Regards,
    Dezhi
  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @AlexAlex81 ,

    Do you want the files to be copied to folders with the same name with file names?

    I made a test for your reference.

    In my scene, both the file name and the folder name contain '-', I use split() to split them with '-' and put the same first half into the same folder.

    vdezhilimsft_0-1669183222096.png

     

    vdezhilimsft_1-1669183222097.png

     

    vdezhilimsft_2-1669183222097.png

     

    vdezhilimsft_3-1669183222098.png

     

    vdezhilimsft_4-1669183222099.png

     

    vdezhilimsft_5-1669183222100.png

     

    Best Regards,
    Dezhi
  • AlexAlex81 Profile Picture
    6 on at

    hi Dezhi,

    Thanks for quick reply.

    I want the files we copy into a "Source folder" to automatically copy to individual folders that we created, based on the keyword that is found in Both File_name and Destination_Foldername.

    For example, if I drag a file named "295OE005 - MRC sbn" into the Source_folder, the Keyword is 295OE005. So, I want the flow to copy it to a folder who's name Starts with 295OE005, i.e. Folder_Name: "295OE005 - OE Singapore" for example.

    Same to happen for any other file - to be copied to the relevant folder with common keyword.

    Not sure if I explained in a clear manner, please let me know. thank you

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @AlexAlex81 ,

     

    Please try this way.

    vdezhilimsft_3-1669256691349.png

    vdezhilimsft_4-1669256737705.png

     

    vdezhilimsft_0-1669256437295.png

    vdezhilimsft_1-1669256472584.png

    vdezhilimsft_2-1669256623500.png

    Rest Regards,

    Dezhi

  • AlexAlex81 Profile Picture
    6 on at

    hi Dezhi,

    Thanks a bunch ! I am a newbie in P.A. and do not really know how to set it up. would it be possible for you to use the Recorder to show me the steps in setting this up ? 

    thanks anyway.

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @AlexAlex81 ,

    Sorry, for some reason, I can't use the screen recording tool, you can try to build the flow based on my screenshots.

     

    Best Regards,

    Dezhi

  • AlexAlex81 Profile Picture
    6 on at

    hi Dezhi,

    I am not yet too familiar on how to set it up. can you please type the path-way ?

    Really appreciate 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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard