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 :
Power Automate - Building Flows
Unanswered

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

(2) ShareShare
ReportReport
Posted on by 4

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).

 

HugooLeal_0-1632226956200.pngHugooLeal_1-1632226972308.png

 

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.

 

 

I have the same question (0)
  • cusacka Profile Picture
    5 on at
    Re: "Copy or move can't rename or replace an existing item at the specified destination location."

    Hi

    I was looking ages for the workaround to copy a file over to another site.
    Setting up the parameters in Power Automate like you did solved the problem and it copied over successfully.

    So thank you 😁

    "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. "


     

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 797 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
developerAJ Profile Picture

developerAJ 319

Last 30 days Overall leaderboard