Java based program for file operations involving large number of files