Showing results for 
Search instead for 
Did you mean: 

Sharepoint Copy File Retaining Version History

When using SharePoint Copy File action either change Replace or add a new option to add the new file to the version history rather than deleting the existing file and resetting the version back to 1. This would reflect what happens if someone updates a file or uploads a new file with the same name as an existing file.


The current scenario is more like delete destination file and then copy.

Status: New
Advocate I

Note that the older "SharePoint - Copy File" action that is now deprecated originally had this functionality when set to overwrite. 

New Member

This is truly unexpected behaviour. We've been telling all SharePoint users that when you add a document to a library and the Filename already exists it will be overwritten if Versioning is off but will create a new version when Versioning is turned on. No matter where or with what you did the copy/move. Even now, with the Copy and Move options in SharePoint online.

But...guess what, Microsoft removes it from Power Automate with no option to bypass in a proper manner. This means no correct working DMS can be made since version trail breaks with first copy.

Please fix!

Advocate III

I completely agree - This is a must.

Why would Microsoft REMOVE this feature in an update?

It's just crazy...

Advocate I

Really unlogical situation.

If I upload an already existing file manually, it creates a new version. (normal behavior).

If I use Copy File action with 'Replace' option while the document with that name already exists, it deletes that document and copies the new one.

Note that the overwritten docment is really gone!!! 

It's not even in the recycle bin. You really have 'Data Loss' here! 


Must be fixed!


Regular Visitor

In our DMS workflows we need the old functionality too. Keep it please

New Member

Same issue here, we are in the middle of the implementation of a sharepointbased DMS. Without the ability to copy files form one to unother library with the preservation of the destination filehistory we can't continue this implementation.


Please create a good solution

New Member

This is critical to our use of sharepoint. It doesn't really belong in the powerautomate section though - how do we get this published on the main sharepoint site?

Frequent Visitor

I have been looking at the same thing for a job I am working on and found if you use the SharePoint "update content" (EDIT this should read "update file") action in Flow you will retain the file version history on the destination file.

You will need to do a "get file contents" first, then use that in the update file action.

Ping me if you want more info.


Advocate I

@BrisM900, That might be an option. I'll try it out.

Frequent Visitor

@JohanV You are correct re "update file" action. I have edited my comment above.

As for checking if the file exists I did this, although someone smarter than me may also know of a better solution.

I do a get files from the library, then filter results on file name, and if count is greater than 0 there is a file with that name already, so update it, if not, then move the file.


If you think my solution will work please let me know.

BTW I just realized that as I'm still developing this I need another step, I need to add a step to get the file identifier but I should be able to get it from the filtered array with a get first. I will update this when I can do that.

Edit: I just got it working with this expression in the file identifier field of "Update file" action