Showing results for 
Search instead for 
Did you mean: 
New Member

"Copy or move can't rename or replace an existing item at the specified destination location."

Hey guys,


I just built a Flow to copy files from one SharePoint library to another. Problem is that, with the first library I tried to copy, the flow ran perfectly, but with the second one it just throws me the following error:


"status":400,"message":"Copy or move can't rename or replace an existing item at the specified destination location. Please manually rename or delete the existing item before you try again.


 Also, I'm not trying to replace or rename any files in the target library, they are all new files.


I assume it's a permission issue, but both libraries are inside the same organization and have the same permission policies. I just can't figure out what's the problem here.


Below, some prints of my flow. A quick overview: the flow is triggered from a power app where the user should include the link of the source library and the destination library. Based on the source library, the flow first gets the Table with the name "Documentos", which is the one I'm trying to copy, and then it runs the get files. Once it's done, it checks the files to see whether they are in the root folder of the library or not, if they are, then they are copied to the destination library (this last condition is to avoid the duplication of files which are inside folders).




EDIT: I've changed the parameter "If another file is already there" of the "Copy file" action to "Fail this action" and it is working fine now. However, I still want to keep this parameter as "Replace" for the cases in which a folder in the destination library needs to update its nested items and folders according to the source library. I guess it is definitely a permission issue, just can't figure out what policies I need to change in the destination library to make it work.




Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,438)