S
Scott McNair
We have several IP cameras, and an application that constantly streams jpg
images off of these cameras to a share. These images are stored with the
convention:
S:\Snapshots\CameraName\YYYY\MO\DD\HH\MI\CameraName.YYYYMODDHHMISSMIL.jpg
(YYYY = year, MO = month, [...], MIL = millisecond)
I'm writing another application that will play these streamed jpegs to an
end-user. The problem I'm running into seems simple on the surgace, but is
for some reason eluding me.
I'd like to write a function that, when passed a date element, will find
the file that corresponds most closely to that date... so if I pass in
9/18/2009 11:13:00, it will find the first file that occurs after that
date, regardless of the subfolder it's in.
I've tried a handful of ways to retrieve it, but they're either overly
convoluted or ridiculously time-consuming. There are several GB of images,
so I can't pull a large list of files into an array and them limit them
down based on the date, and recursing through the folder hierarchy is
overly convoluted.
Does anybody know of a robust, quick solution that would do what I need?
Regards,
Scott
images off of these cameras to a share. These images are stored with the
convention:
S:\Snapshots\CameraName\YYYY\MO\DD\HH\MI\CameraName.YYYYMODDHHMISSMIL.jpg
(YYYY = year, MO = month, [...], MIL = millisecond)
I'm writing another application that will play these streamed jpegs to an
end-user. The problem I'm running into seems simple on the surgace, but is
for some reason eluding me.
I'd like to write a function that, when passed a date element, will find
the file that corresponds most closely to that date... so if I pass in
9/18/2009 11:13:00, it will find the first file that occurs after that
date, regardless of the subfolder it's in.
I've tried a handful of ways to retrieve it, but they're either overly
convoluted or ridiculously time-consuming. There are several GB of images,
so I can't pull a large list of files into an array and them limit them
down based on the date, and recursing through the folder hierarchy is
overly convoluted.
Does anybody know of a robust, quick solution that would do what I need?
Regards,
Scott