I found this directory checking code on the web and modified it a little, so it would print out added files. There\'s a buoy that sends me readings every now-and-then, but s
added.sort(key=lambda x: os.stat(os.path.join(path_to_watch, x)).st_mtime)
Will sort the added list by the last modified time of the files
added
Use st_ctime instaed of st_mtime for creation time on Windows (it doesn't mean that on other platforms).
st_ctime
st_mtime