import shutil original = r'original\path\where\the\file\is\currently\stored\file_name.extension' target = r'target\path\where\the\file\will\be\copied\file name.extension' shutil.copyfile(original, target)
Here is what the above code is Doing:
1. We’re importing the shutil module.
2. We’re creating two variables, original and target.
3. We’re using the shutil.copyfile() function to copy the file from the original path to the target path.