title: Copy content from local folder to remote folder in python
body: <p>I am trying to copy files from  a local folder to a remote windows share using python. So the main requirement is to move files from source folder (which keeps changing) to a Remote Share:</p>
  
  <p>Not sure what I am doing wrong but below is what I have tried to so far:</p>
  
  <pre><code># Move the archive file to DVD Burner Box
   destPath = '\\\\10.10.10.10\\DestFolder\\'
   destFolder = destPath + ('%s_%s\\') %(id1,id2)
   srcArchFolderPath = '.\\prepared\\%s_%s\\' %(id1,id2)
   srcArchFiles = os.listdir(srcArchFolderPath)
  
  try:
      os.makedirs(destFolder)
  except OSError:
      pass
  
  shutil.copytree (srcArchFiles,destFolder,ignore=None)
  </code></pre>
  
  <p>The sourceFolderPath keeps changing on every run with different input. </p>
  
  <p>Ex: it can be .\prepared\1_2 or .\prepared\2_3 which will keep changing on every script run. </p>
  
  <p>If I print srcArchFiles it shows list of the folders which exists in  srcArchFolderPath succesfully. Also os.makedirs(destFolder) creates a folder succesfully on the remote share location. But the files copy is failing and not sure why it's failing, I belive I am not doing something right with shutil. </p>
  
  <p>Following is the error I am seeing:
  File "C:\Python26\lib\shutil.py", line 140, in copytree
  names = os.listdir(src)
  TypeError: coercing to Unicode: need string or buffer, list found</p>
  
  <p>Any help in correcting this is much appreciated. </p>