cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

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

Hi @ArturDj,

 

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.

View solution in original post

2 REPLIES 2
Highlighted
Post Prodigy
Post Prodigy

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

 

Highlighted
Community Support
Community Support

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

Hi @ArturDj,

 

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,964)