Jump to content

Find most recently created or modified image(file)


Recommended Posts

Posted

Hi everyone, I have a question: Suppose there's a folder containing a large number of PNG images — say, around 10,000 files. What's the best way to get the name of the most recently created or modified image in that folder? Is there a faster method?

Posted

Have you tried this? The `last mod` output should hopefully give you the timestamp of the last modification, and it would then be pretty simple to find the latest.

I have no idea what the performance of this would be if you loop over 10000 files. That is something you would just have to try.

 

image.png.8ae2348bb0515a56018e9a47050dd8c9.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.