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

Community site session details

Session Id : wgOLmChxja8oPlCQlb04A6
Power Automate - Building Flows
Answered

Trying to copy a file into existing folder, if folder doesn't exist created folder based off file name

Like (0) ShareShare
ReportReport
Posted on 7 Aug 2020 12:54:01 by

Hi,

 

I should start by saying I'm entirely new to flow (minus a few approvals flows I've done recently). I am trying to create a flow that when a file is added to the library, it will copy the file into a different library and place it in an existing/new folder based off the file name.

 

However, if the folder doesn't exist within the library then create a new folder using the file name (refer to document names below) then copy the file and if the folder does exist to copy it in the correct folder based off the file name

 

ASP5C4567 - (Folder name)

- ASP5C4567 - Product Label - LABEL123.PDF (this will be a standard naming of all files uploaded)

- ASP5C4567- Box Label - BOXL123.PDF

- ASP5C4567 - Box Artwork - CBOX123.PDF

 

I wish I could show an example of what I have attempted, but I'm having a hard time even starting it.

 

If there is any more information that I can provide then, please ask.

 

Kind Regards,

Artur

I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on 10 Aug 2020 at 07:01:21
    Re: Trying to copy a file into existing folder, if folder doesn't exist created folder based off file name

    Hi @Anonymous,

     

    Instead of using copy file action, you could use the create file action to copy the file. The Create file action could create a folder in the Sharepoint library if the folder doesn't exist. For example, this is an instance that creates a file the folder path does not exist:

    Annotation 2020-08-10 134917.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • PrasadAthalye Profile Picture
    on 07 Aug 2020 at 16:02:18
    Re: Trying to copy a file into existing folder, if folder doesn't exist created folder based off file name

    Try something like below...

     

    PrasadAthalye_0-1596816061879.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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2