File Copying

Lyle Johnson lyle at users.sourceforge.net
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:

	http://www.python.org/doc/current/lib/module-shutil.html

Hope this helps,

Lyle




More information about the Python-list mailing list