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..