Giorgos Myrianthous Updated on March 25, 2025
Python’s shutil module offers four different ways to copy a file — shutil.copy(), shutil.copyfile(), shutil.copy2() and shutil.copyfileobj(). Here’s how to use each method and which one to pick to copy a file in Python.