title: how to copy directory with all file from c:\\xxx\yyy to c:\\zzz\ in python
body: <p>I've been trying to use "copytree(src,dst)", however I couldn't since the destination folder should exists at all.Here you can see the small piece of code I wrote:</p>
  
  <pre><code>def copy_dir(src,dest):
      import shutil
      shutil.copytree(src,dest)
  
  copy_dir('C:/crap/chrome/','C:/test/') 
  </code></pre>
  
  <p>and this is the error I m getting as I expected...</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\workspace\MMS-Auto\copy.py", line 5, in        &lt;module&gt;
  copy_dir('C:/crap/chrome/','C:/test/')   
  File "C:\Documents and Settings\Administrator\workspace\MMS-Auto\copy.py", line 3, in copy_dir
  shutil.copytree(src,dest)
  File "C:\Python27\lib\shutil.py", line 174, in copytree
  os.makedirs(dst)
  File "C:\Python27\lib\os.py", line 157, in makedirs
  mkdir(name, mode)
  WindowsError: [Error 183] Cannot create a file when that file already exists:    'C:/test/'
  </code></pre>
  
  <p>Here is my question is there a way I could achieve the same result without  creating my own copytree function?</p>
  
  <p>Thank you in advance.</p>