This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def order_files_by_date(path_to_folder, file_type): | |
files = glob.glob("%s*%s" % (path_to_folder, file_type)) | |
files.sort(key=os.path.getmtime) | |
return files |
NewerOlder