title: FileNotFoundError: [Errno 2] No such file or directory: '2MCREF~E.JPG'
body: <p>I'm trying to open an image that resides at a different location than my script</p>
  
  <p>Code:</p>
  
  <pre><code>import os
  from PIL import Image
  
  folder = '/Users/abc'
  if not os.listdir(folder):
      print('Folder not found')
  else:
      print('"{}" found'.format(folder))
  
  for file in os.listdir(folder):
      print(file)
      data = Image.open(file,'r')
  print('Done')
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>"/Users/abc" found
  2MCREF~E.JPG
  Traceback (most recent call last):
    File "img_to_s3bucket.py", line 25, in &lt;module&gt;
      data = Image.open(file,'r')
    File "/Users/AjayB/anaconda3/envs/MyDjangoEnv/lib/python3.6/site-packages/PIL/Image.py", line 2770, in open
      fp = builtins.open(filename, "rb")
  FileNotFoundError: [Errno 2] No such file or directory: '2MCREF~E.JPG'
  </code></pre>
  
  <p>How to tackle this?</p>