refatoring the copy/move functinality

17 jobs for 840-copy-function-for-files-mainfiles in 70 minutes and 34 seconds (queued for 3 seconds)