title: Open up memes from a .jpg file when the pc starts up using Python
body: <p>I'm trying to open files in a directory that doesn't have just .jpg files in it
  here's the code i wrote:</p>
  
  <pre><code>import os
  import random
  import time, shutil
  path=(r"C:\Users\KIMEDIAS\Desktop\Noice\PYTHON")
  files=os.listdir(path)
  d = random.choice(files)
  os.startfile(d)
  time.sleep(2)
  quit()
  </code></pre>
  
  <p>Can someone help me so i can specify the file type it open's. And, if you can make it close the process and delete the file after some seconds.</p>