SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

Replace the line of code - File.copyTo(_destinationlibUrl, true);


File.moveTo(_destinationlibUrl, true);

It should work.

share|improve this answer
You should be using the enum from the answer below: File.MoveTo(_destinationLibUrl, SP.MoveOperations.none); – iOnline247 Jan 25 '13 at 20:14

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:

share|improve this answer

Try this


This is what got it working for me

share|improve this answer
Please provide more information. – Karthik Jaganathan Mar 25 '14 at 11:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.