If "name1" is a directory name, the option "-r" should be used. This will cause all the files and directories beneath this directory to be copied in a recursive fashion.
"Name2" may be either the name of a file or directory which does not exist, or the name of a directory which does exist. In the latter case, the copied entity will maintain the same name, and will be placed in this directory.
The copy will not overwrite a file or directory which already exists.