Do I have to list all of the files and sort it by date and time or is there any other way?

TIA