Looping through files with date component

I have a list of files which has format: RECVD-YYYY-MM-DD-binry
I would like to get the files with the highest and lowest dates, and process them sequentially. For example, I have:
RECVD-2008-05-12-binry
RECVD-2008-05-13-binry
RECVD-2008-05-14-binry
RECVD-2008-05-15-binry
RECVD-2008-05-17-binry
RECVD-2008-05-19-binry
RECVD-2008-05-20-binry

I would like to get the file with the least date, that is RECVD-2008-05-12-binry and the max date which is RECVD-2008-05-20-binry. Then, process the files one by one starting from lowest date to highest date. If the file is missing, write it to a MISSED file. So the pseudocode will look like this:

MinDate = date of file in the list which has min date
MinDate = date of file in the list which has max date
dummy = MinDate;

For dummy <= Maxdate
loop
If RECVD-<dummy>-binry exists
then
process
else
write to MISSED file RECVD-<dummy>-binry
end if;
dummy + 1
end loop

Thanks a lot in advance..

Hi,

For findind the max and min date,

sort -t"-" -k2,2 -k3,3 -k4,4 filename >> temp

Maxdate=`cat temp | tail -1`
Mindate=`cat temp | head -1`

Remaining can be done as per the pseudo code

Thanks
Penchal