Not sure about sharepoint but you could try changing the .movefile to .copyfile and see if this works. If it does you can then just delete the original file as the following line in the code.

What error does it come up with?