1
I am copying a number of images from a slow network share that exposes a digital camera's DCF file system. I don't want all the images, just those that fall within a specific time interval.
Calling stat
on each file to get its timestamp takes too long, so I'm trying to be more efficient about it.
The DCF filesystem splits every 1,000 photos into a separate directory. One idea is to sort the files in a given directory by the filename number, e.g., DSC00590.JPG
, DSC00591.JPG
, DSC00592.JPG
, and then check the timestamps of the first and last files to see if the whole directory falls outside my interval or not.
However this might fail if a photo is deleted, and a new photo is subsequently taken, should the new photo get the number of the deleted one. That would break the assumption that the timestamps and filenames are both monotonically increasing.
So the question is: Is it safe to assume monotonically increasing file numbering? Is there some other trick I could use to efficiently subset the photos according to timestamp?
This does not answer the question should've been posted as a comment – Máté Juhász – 2019-11-04T05:31:20.593