What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
Here's my answer using glob without filter if you want to read files with a certain extension in date order (Python 3).
dataset_path='/mydir/' files = glob.glob(dataset_path+"/morepath/*.extension") files.sort(key=os.path.getmtime)