Python

Copy file in Python

Copy file in Python using built-in shutil module. Source file will be coppied to new to a new directory. We will use shutil.copy2() function to copy file to preserve timestamp information.

filecopy

Interactive recipe

You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.

Python code

# Python code will be here

Code explanation

Copy file to new destination directory.

Example Python notebooks

Please find inspiration in example notebooks

« Previous
Delete file