How to Copy files and Folders from one site to another using Jquery or Java Script in SharePoint online?

Hello SharePointers,

Here are the code to copy files from one sharepoint site to another in Office 365 environment.

function copyFile() {
var current_context = SP.ClientContext.get_current();
current_context.executeQueryAsync(function(){ PageCopySuccess(); },function(){ PageCopyFailure(); });
function PageCopySuccess(){
function PageCopyFailure(){
alert(‘Sorry, Try once again’);

Happy SharePointing 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *