That isn't copying a file onto itself; there's nothing to prevent you doing what you want.
Your copyfile command isn't referencing the alternate folder in the source file it would appear by the error; however, you neglected to show us the command as you wrote it so we can't do more than surmise the cause.
If your current working directory is the target, then
should have no issues. If you are in the other directory when trying, then
To be sure, wherever you are, use fully-qualified file names for both source and target.