Do anyone already have code to copy nested files to a flat directory?

Podi prettyboy988-google at yahoo.com
Mon Mar 20 20:12:58 EST 2006


Hi,

I am trying to copy all files under a directory tree to a single
directory (in Windows). I can well write the script myself, but was
wonder if anyone has done it so I won't be reinventing the wheel.

Thanks in advance.

Requirement:

# Source file set
source\file1.txt
source\file2.doc
source\dir1\file3.ini
source\dir2\file4.exe

# Desired target file set
target\file1.txt
target\file2.doc
target\file3.ini
target\file4.exe




More information about the Python-list mailing list