Why sort at all?
The problem is to find the oldest file, that's it.
just walk the list of files, and compare every one to the 'currently newest', this would be the most efficient solution.
I'm shocked that people actually suggested Shwartzian Transform and similiarly overgrown solutions to such simple problem.
In reply to Re: Finding oldest file in directory
by Eyck
in thread Finding oldest file in directory
by Nitrox
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |