Use shutil.copyfile()
to copy a file:
from shutil import copyfile copyfile(filename)
Note that some of the file metadata may be lost when copying a file.
Reference: shutil — High-level file operations
Use shutil.copyfile()
to copy a file:
from shutil import copyfile copyfile(filename)
Note that some of the file metadata may be lost when copying a file.
Reference: shutil — High-level file operations