This is exactly, what you find in the documentation. Please read:
help copyfile
doc copyfile
[SUCCESS,MESSAGE,MESSAGEID] = copyfile(SOURCE, DESTINATION) attempts to
copy SOURCE to DESTINATION. If SOURCE constitutes a directory or
multiple files and DESTINATION does not exist, copyfile attempts to
create DESTINATION as a directory and copy SOURCE to DESTINATION. If
SOURCE constitutes a directory or multiple files and DESTINATION exists
as a directory, copyfile attempts to copy SOURCE to DESTINATION.
This means, that copyfile copies the files from the source directory to the destination directory. This sounds intuitive for a function, which is called "copy file".
Best Answer