Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python duplicate file

>>> import shutil
>>> # Copy the file in same folder with different name
>>> shutil.copy('original.txt', 'duplicate.txt')
'/home/username/duplicate.txt'
>>> shutil.copy('original.txt', 'my_folder/duplicate.txt')
'/home/username/my_folder/duplicate.txt'
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #duplicate #file
ADD COMMENT
Topic
Name
1+2 =