Shutil.copyfile (SRC, DST) is copied from source Src to DST. The premise is, of course, that the destination address has writable permissions. The exception information thrown is IOException. If the current DST already exists, it will be overwritten.
Shutil.move (SRC, DST) move files or rename
Shutil.copymode (SRC, DST) just replicates its permissions other things are not copied
Shutil.copystat (SRC, DST) copy permissions, last access time, last modified time
Shutil.copy (SRC, DST) copy a file to a file or a directory
Shutil.copy2 (SRC, DST) copy files on the basis of copy the last access time and modification time are also copied, similar to cp–p things
Shutil.copy2 (SRC, DST) if the file system in two locations is the same, it is equivalent to rename operation, just renaming; if it's not the same filesystem, it's a move operation.
Shutil.copytree (Olddir, Newdir, True/flase)
Copy the Olddir to a newdir, if the 3rd parameter is true, the symbol connection under the folder will be kept when the directory is copied, and if the 3rd parameter is false, a physical copy will be generated in the replicated directory instead of the symbolic connection
Shutil.rmtree (SRC) recursively deletes a directory and all content within the directory
Reprint Http://www.jb51.net/article/50070.htm
Python file copy mobile Shutil module