title: How to copy first 100 files from a directory of thousands of files using python?
body: <p>I have a huge directory that keeps getting updated all the time. I am trying to list only the latest 100 files in the directory using python. I tried using os.listdir(), but when the size of directory approaches 1,00,000 files, it seems as though listdir() crashes( or i have not waited long enough). I only need the first 100 files (or filenames) for further processing, so i dont want listdir() to be filled with all the 100000 files. Is there a good way of doing this in Python?</p>
  
  <p>PS: I am very new to programming</p>