Peter Otten wrote: > Steven D'Aprano wrote: > >> files.sort() >> the_file_name = files[-1] > > You don't need to sort if you want only one file: > > the_file_name = max(files) Nice catch! -- Steven