9951 explained code solutions for 126 technologies


pythonHow to copy file


import shutil
shutil.copyfile('/tmp/a.txt', '/tmp/b.txt')ctrl + c
shutil

library to work with files and folders

copyfile

copies one file to another

/tmp/a.txt

source file to copy

/tmp/b.txt

target path to copy file to