SwDMApplication::MoveDocument

I Have a Program that is using swDmMoveCopyError=swDMApplication.MoveDocument(fromFile, toFile, null, null, 1, iSwDMSearchOption)

the [toFile] might exist and i want overright it

it work at first,
But now  on  Part Files it is deleteing the [toFile] and return swDmMoveCopyError =2

How do i fix this.

SolidworksApi macros