>Probably it could be done this way, but to create the second array with dates, one needs to scan all files anyway.
Correct, but all the files (or elements in the array) has to be scanned in VFP also. The only difference is that it is cleverly hidden behind a function call (ASORT).
Did you search CodeProject or any other sites for a way to do this (I am sure someone else has done something like this)?
Semper ubi sub ubi.