title: Copy contents from one directory and paste in another, IOError: [Errno 13] python
body: <p>I've looked through the forum at several posts similar to this w/ the same error, but am still unable to fix it. I am getting the IOError: [Errno 13] Permission denied: 'C:/..../.' when using shutil.copy(). Here is the code:</p>
  
  <pre><code>import subprocess, os, shutil
  
  for i in range(1,3):
      path = 'C:/Users/TEvans/Desktop/Testing/slope%d' % i 
      if not os.path.exists(path): 
          os.makedirs(path)
      os.chdir(path)
      for j in range(1,4):
          path1 = 'C:/Users/TEvans/Desktop/Testing/slope%d/r%d' % (i, j)
          if not os.path.exists(path1): 
              os.makedirs(path1)
          src = 'C:/Users/TEvans/Desktop/Testing/PP%d/S%d' % (i, j)
          dst = 'C:/Users/TEvans/Desktop/Testing/slope%d/r%d' % (i, j)
          shutil.copy(src, dst)
  
  
  Traceback (most recent call last):
    File "sutra.py", line 14, in &lt;module&gt;
      shutil.copy(src, dst)
    File "C:\Python27\lib\shutil.py", line 117, in copy
      copyfile(src, dst)
    File "C:\Python27\lib\shutil.py", line 82, in copyfile
      with open(src, 'rb') as fsrc:
  IOError: [Errno 13] Permission denied: 'C:/Users/TEvans/Desktop/Testing/PP1/S1'
  </code></pre>