Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
python copy file to new filename 1

python copy file to new filename

June 24, 2022 by Anurag batra
shutil has many methods you can use. One of which is:

from shutil import copyfile
copyfile(src, dst)

Here is what the above code is Doing:
1. We’re importing the copyfile method from the shutil module.
2. We’re using the copyfile method to copy the contents of the file at src to the file at dst.

Categories Python Examples
Post navigation
how to add value to to interger in python
two elements at a time in list comprehension
© MyEduKit - 2022 . All Rights Reserved.