cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

SharePoint 'Copy File' action does not replace existing file when 'If another file is already there' flag is set to 'Replace'

Hi Team,

I'm trying to copy a excel file from one SharePoint library to a subfolder in the same library.

I want to make sure that if the file of similar name exist then it should get completely replaced by the file being copied.

Hence, in the  SharePoint 'Copy File' action I specified the 'Replace' flag for 'If another file is already there' property.

 

But now everytime I run the flow, instead of replacing the file the original files still persist.

have u experienced this issue before? If so how did you circumvent it.

 

Ps..

- I tried to delete the file using the 'Delete File' action before running the 'Copy' option, but it always gives me error saying the file is opened and cannot be deleted.

- The file is not opened by anyone else (as only I have access to it)  and in the error its mentioned its opened using my credentials. hence I suspect some issue with releasing control once copy operation is done. (not sure thoe)

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: SharePoint 'Copy File' action does not replace existing file when 'If another file is already there' flag is set to 'Replace'

Hi @RohanWadiwala,

 

There are serval tips about Excel file locked for editing.

https://support.microsoft.com/en-us/office/excel-file-is-locked-for-editing-by-another-user-6fa93887...

 

Generally, the Excel file will be locked after you edit it, if you want to delete them, you should wait about 10 minutes.

I tested on my side and find the Replace of the copy file action is not work temporary, as a workaround, I choose to delete the file then create a new one in the other folder with the same name by using original file content:

Annotation 2020-07-08 170029.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

1 REPLY 1
Highlighted
Community Support
Community Support

Re: SharePoint 'Copy File' action does not replace existing file when 'If another file is already there' flag is set to 'Replace'

Hi @RohanWadiwala,

 

There are serval tips about Excel file locked for editing.

https://support.microsoft.com/en-us/office/excel-file-is-locked-for-editing-by-another-user-6fa93887...

 

Generally, the Excel file will be locked after you edit it, if you want to delete them, you should wait about 10 minutes.

I tested on my side and find the Replace of the copy file action is not work temporary, as a workaround, I choose to delete the file then create a new one in the other folder with the same name by using original file content:

Annotation 2020-07-08 170029.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
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (4,250)