I have two java programs
1) First program runs everyday and generates file abc_currenttimestamp.csv (e.g. abc_1357615107)
2) Second program runs everyday and reads file generated by first program. But the file it has to read is previous days file and not the file that was generated today.
For e.g first program generates files on 9th Jan and 10th Jan etc. Second program starts running from 10th and should read file having time-stamp of 9th Jan.
One way could be second program checks the time-stamp of all files and finds if it is previous days time-stamp. I don't know how to do this in Java.
Another way could be that first program writes the file name to a field and second program knows file name by reading from this field. But the problem is every time first program runs everyday its going overwrite this field with today's file name.
Thanks!