File Copying

Lyle Johnson lyle at
Mon Jun 24 13:22:22 EDT 2002

Rajat Chopra wrote:
> How do you copy a file from one directory to another. I have looked all over and haven't found any documentation on it. Essentially, I want to copy a file from $SRC_DIRECTORY to $TARGET_DIRECTORY.
> Does anyone know which modules are used? Or does anyone have some sample scripts?

The shutil module should do the trick:

Hope this helps,


More information about the Python-list mailing list