cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Move file to new folder when file is created - action not working

Hi everyone, 

 

I might have a simple question, but I can't seem to find the solution. 

So when a file is created in a sharepoint, I want to create a folder with the name of the file and then move the file under the new folder with same name.

The create a new folder with the name of file works, but I can't seem to move the new file to the new folder. 

I'm assuming I might be using the wrong dynamic data. I have tried almost all dynamic data though, so not sure.

 

Thanks for helping me out!

 

Best regards,

Laura

Capture4122.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions

 

Hi @Anonymous ,

 

 

Please use the following configuration to configure Copy file action.

Do not add "/" between Folder path and File name with extension.

I tested it on my side, this method works, please try again.

112.PNG

 

 

Best Regards,

Community Support Team _ Barry
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

 

Hi @Anonymous ,

 

It is also not recommended to create a new folder in the same Library. This will cause the Flow to be triggered repeatedly.

 

Because Copy file and Create new folder action will make Flow trigger again if it is performed in the same Library.

 

Best Regards,

Community Support Team _ Barry
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

9 REPLIES 9
Super User II
Super User II

Hi @Anonymous 

 

You're only passing the name to the "Destination Folder". You need to include the full path so that it can be saved in the correct place.

 

Makes sense?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Anonymous
Not applicable

Hi @manuelstgomes

 

Thank you for your reply, but I'm sorry as I'm quite a novice, I don't understand.

I have tried using the folder path dynamic data instead of identifier. I have tried multiple dynamic data options and it doesn't work. 

Do I need to add an additional action like get file content?

Thanks in advance for the info!

Hi @Anonymous 

 

No worries, we'll figure this out :).

 

In the copy file you're only mentioning the name of the file, but you need the full path to it.

 

Try the following:

2019-12-09 15_26_00-Create your flow _ Microsoft Power Automate.png

 

Does it make sense? I'm not able to test this on my side, but I'll try to keep on helping you until I arrive at my desk :).

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Anonymous
Not applicable

Hi @manuelstgomes 

 

Unfortunately your proposed solution did not work. 

I tested it for botht he action copy as move your file and I tested it for both' folder path/file name with extension' as well as folder path file name with extension' (removing the /).

 

Thanks for helping me out! 🙂

Best regards,

Laura

 

Hi @Anonymous ,

 

 

Please use the following configuration to configure Copy file action.

Do not add "/" between Folder path and File name with extension.

I tested it on my side, this method works, please try again.

112.PNG

 

 

Best Regards,

Community Support Team _ Barry
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

Anonymous
Not applicable

@v-bacao-msftThanks for the proposed solution.

It doesn't work in my case as it says the destination path cannot be the same as the source object itself.

However, it does work when I use the action move file and then followed by copy file, but then it says the flow keeps running.

 

Ideally for me it would be in the same library but just in a subfolder. For example people upload a file they filled in from a template, upload it in the page and then automatically a new subfolder is created with the file in that subfolder, were they cn add additional files with regards to that event/case.

 

Best regards,

Laura

 

Capture2.PNG

 

Hi @Anonymous ,

 

Please note that the Dynamic content configured in the Destination Folder comes from Create new folder, not from When a file is created.

 

Best Regards,

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

 

Hi @Anonymous ,

 

It is also not recommended to create a new folder in the same Library. This will cause the Flow to be triggered repeatedly.

 

Because Copy file and Create new folder action will make Flow trigger again if it is performed in the same Library.

 

Best Regards,

Community Support Team _ Barry
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

Anonymous
Not applicable

Hi @v-bacao-msft 

 

With regards to the dynamic data, I used the 'create new folder' dynamic data for destination folder and it did not work, giving the same error. 

However, if I used a different libary it worked. So I will have to change my process so people upload in a different library than where I create the new file.

Thank you for your help and time!

 

@manuelstgomesAlso thank you for your help!

 

Best regards,

Laura

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (37,465)