title: Im getting this errno 2 when trying to copy files with python
body: <p>I am trying to move a lot of files from a directory and all of it's underlying folders, but when i run my code. The script can't find the first .pdf file. Which I find strange, because the file is indeed there</p>
  <pre><code>import shutil
  import os
  #Change the working directory to where files are located
  os.chdir(&quot;C:\\Users\\vhole\\iCloudDrive\\BA_Historie\\&quot;)
  
  #Get current working directory
  directory = os.getcwd()
  print(f&quot;Current working directory is {directory}&quot;)
  #Walking through a folder tree
  for folders,subfoldes,filenames in os.walk('C:\\Users\\vhole\\iCloudDrive\\BA_Historie\\'):
      for filename in filenames:
          if filename.endswith('.jpg') or filename.endswith('.pdf'):
              shutil.copy(filename,'C:\\Users\\vhole\\iCloudDrive\\BA_Historie\\Samlede_tekster\\', follow_symlinks = True)
  </code></pre>
  <p><strong>This is the traceback and error i am getting:</strong></p>
  <pre><code>Traceback (most recent call last):
    File &quot;project13.py&quot;, line 18, in &lt;module&gt;
      shutil.copy(filename,'C:\\Users\\vhole\\iCloudDrive\\BA_Historie\\Samlede_tekster\\', follow_symlinks = True)
    File &quot;C:\Users\vhole\AppData\Local\Programs\Python\Python37\lib\shutil.py&quot;, line 248, in copy
      copyfile(src, dst, follow_symlinks=follow_symlinks)
    File &quot;C:\Users\vhole\AppData\Local\Programs\Python\Python37\lib\shutil.py&quot;, line 120, in copyfile
      with open(src, 'rb') as fsrc:
  FileNotFoundError: [Errno 2] No such file or directory: 'Det_moderne_Norden_program.pdf'
  </code></pre>