1
2shutil has many methods you can use. One of which is:
3
4from shutil import copyfile
5copyfile(src, dst)
1import shutil
2
3original = r'original path where the file is currently stored\file name.file extension'
4target = r'target path where the file will be copied\file name.file extension'
5
6shutil.copyfile(original, target)
7
1# Copy a file in Python using copy() method
2import shutil
3shutil.copy( '/src/test/source.txt' , '/dest/destination.txt' )
1# Copy a file in Python using copyfile() method
2import shutil
3shutil.copyfile( 'source.txt' , 'destination.txt' )
1# Copy a file in Python using copy2() method
2import shutil
3shutil.copy2( '/src/test/source.txt' , '/dest/destination.txt' )