cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HolgerLoebel
Level: Powered On

How do I define a dynamic destination folder when copying a file?

 

 I want to execute  the following sequence:

Trigger: Create a sharepoint list item

 

Actions:

  1. Create a new planner bucket and tasks based on the list item >> solved
  2. Create a new sharepoint folder >> solved with the "create file in correct path and delete file afterwards"-workaround that is postet here and there in this forum
  3. Create a new .docx-document in the new sharepoint folder

I struggle with the third step. I learned:

  • Flow cannot create a .docx-file directly
  • Workaround: copy a file from a template instead

I succeed with the "create copy" in a fixed, pre-defined folder path, however I don't know how I can adress the newly created sharepoint-folder with the "copy file"-flow. 

 

How do I express the destination path correctly to adress a folder that is not already existend at the time when I create the "copy file"-flow? What is the right variable to do so?

 

Any help is highly appreciated. Thx.

1 REPLY 1
Community Support Team
Community Support Team

Re: How do I define a dynamic destination folder when copying a file?

Hi @HolgerLoebel,

 

Could you please share a screenshot of the configuration of your flow?

 

For your step 2:Create a new sharepoint folder >> solved with the "create file in correct path and delete file afterwards"-workaround that is postet here and there in this forum,

Why are you create file in correct path and delete file afterwards,and then in the step3 to copy the file to the folder path?

 

I suggest that you could combine the step2 and step3, to copy the file to a path directly.And I have made a test on my side to create a flow as below:

 Capture.PNG

You could refer to me to copy the file to the new path "NewFiles" directly, the "Copy file" action would check if the path "NewFiles" is exist, if the path "NewFiles" is exist, create the file "Summary.docx" to the path, if the path "NewFiles" isn't exist, create the path "NewFiles" and then create the file "Summary.docx" to the path.

 

The flow would run successfully as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

Best regards,

Alice

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 83 members 4,360 guests
Please welcome our newest community members: