Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python copy file

import shutil
shutil.copyfile('src','dst')
shutil.copyfile('file.txt','file-copy.txt') # Copy contents alone
shutil.copy('file.txt','file-copy.txt') # Copy content and permission
shutil.copy2('file.txt','file-copy.txt') #Copy content, permission and metadata
Source by datatofish.com #
 
PREVIOUS NEXT
Tagged: #python #copy #file
ADD COMMENT
Topic
Name
3+3 =