just as a note, here you might want to use listFiles with the filenamefilter as parameter. I will add it while I browse your code.