Actually, after considering Zaxo and tadman's responses, you might be better off altering the code above to find the directory with the most recent modified time (Zaxo's suggestion), then use glob on that directory (tadman's suggestion) to find the most recent file. That might be more efficient given the number of files and directories that you are searching through because you would only be storing directories in the hash and the application would not be calling stat on all those files.
In reply to Re: Re: Get newest file
by Rich36
in thread Get newest file
by Spida
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |