I'm having trouble coding the following in Jython and wondered if anyone could help.
I have a directory \bin\ and wish to copy the contents of various other \bin\ 's including their sub-directories into the "master" \bin\ directory.
This is actually part of a script for a source control system where any files that a component has are copied from the components \bin\ into a master application \bin\ which will contain everything that is needed for distributing to the end users.
I've written the code to find the various directories etc., but I can't find a simple command to allow me to copy everything from one directory (including sub-directories) into another directory. I effectively want a function such as, copyDir(source directory\*.*, destination directory\*.*) which also copies any sub-directories.
I've seen the shutil module and the copytree() function, which I thought would be the answer, but the documentation states that this only works if the destination directory does not already exist. In my case, I want to copy lots of component \bin\ directories into one application \bin\ directory so the destination will exist.
Can anyone help?