I found this nice article about copying files from one location to another FIXED location.
However this copies but not moves, I can't find any documentation about moving files using ecmascript, but I suppose it should be possible.
Any ideas?
I found this nice article about copying files from one location to another FIXED location.
However this copies but not moves, I can't find any documentation about moving files using ecmascript, but I suppose it should be possible.
Any ideas?
Replace the line of code - File.copyTo(_destinationlibUrl, true);
to
File.moveTo(_destinationlibUrl, true);
It should work.
File.MoveTo(_destinationLibUrl, SP.MoveOperations.none);
You need to set operation flag instead of boolean variable as the second parameter. For example
File.MoveTo(_destinationLibUrl, SP.MoveOperations.none);
here's a link to a full list of possible operations:
Try this
File.moveTo(_destinationlibUrl,1);
This is what got it working for me