shutil move file python code example
Example 1: python copy file
from shutil import copyfile
copyfile(src, dst)
Example 2: os.move file
import os
import shutil
os.rename("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
shutil.move("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
os.replace("path/to/current/file.foo", "path/to/new/destination/for/file.foo")