Forum Discussion
versioning fails when copying
- Mar 03, 2020
Hi mtarler,
I thought a custom permission level would work but it did not. I could not find a site, document library or versioning setting that would help either.
This is not ideal, but you can create a trigger to notify you when a file is deleted using Power Automate. This will provide an opportunity to intervene and restore the file (and version history) from the site recycle bin.
I hope this helps.
Norm
Hi - mtarler - I don't have an answer, just more details that my team figured out recently.
Like you said, if you drag and drop a file into a library, you'll be adding a version (if a file with the same name exists).
However, if you use the Move or Copy feature to move/copy a file from another SharePoint/OneDrive library, then it'll completely replace the existing file, including the version history.
If you use the Move or Copy feature when there is no existing file in the destination, the Move feature will bring the version history but the Copy feature won't.
Before we tested all of this, we assumed that copying a file would simply add a new version (like uploading a file) but that's not the case and it feels like a bug to us (poor user experience at best).
- Norman YoungMar 02, 2020MVP
Hello mtarler and Deleted,
This is interesting behavior and not what I would have expected. I've reached out to others for confirmation of the behavior. I will follow up when I hear back
I hope this helps.
Norm
- mtarlerMar 02, 2020Silver Contributor
Norman Youngthank you for looking into this. I have some more information to add:
If you map a network drive to sharepoint I found everything appears to work correctly from there. Specifically:
a) copying a file from another library to the controlled library (both using file explorer windows) will say 'no' if it isn't checked out or create a new version if it is checked out and you 'over write'.
b) copying from another library using file explorer and dragging to edge window with controlled library will also create a new version when you over write a checked out file
also interestingly:
a) in the mapped drive in file explorer you can rename a file in a controlled library without checking it out
b) you can right click (or ctrl click) to copy a file you are dragging (in edge it will only move the file using the click and drag)
c) a down side to using the mapped drive in file explorer appears to be the inability to check out/ check in documents (although you are prompted when you open documents and such)
- Norman YoungMar 02, 2020MVP
Turns out this behaviour is by design.
When you use Copy to with documents that have version history, only the latest version is copied. To copy earlier versions, you need to restore and copy each one.
More information on the Copy files and folders between OneDrive and SharePoint sites site.
Thanks to Susan Hanley for pointing us to the official answer.
I hope this helps.
Norm
- mtarlerMar 02, 2020Silver Contributor
Norman Youngsorry I didn't see your reply while I posting my updated info.
But your answer does NOT help. I know that behavior and even mentioned it in my original post. The behavior I have complaint with is that if you copy or move a file to over write a file in a protected library it doesn't save the previous version. If I upload from my computer (which is basically what I guess is also happening using the mapped drive technique I mentioned just a few mins ago) it overwrites the file but adds it as a new version (i.e. maintains the old file a prior version). Even, as I just noted in my update, if I copy or move a file between 2 windows using the mapped drive in file explorer it over writes the file as a new version. BUT if you use the copy or move feature in the online sharepoint to over write a file with a new version it completely wipes out the prior version. That seems to defeat the whole controlled library point.