I have to deal with a directory of about 2 million xml\'s to be processed.
I\'ve already solved the processing distributing the work between machines and threads us
If file names follow certain rules, you can use File.list(filter) instead of File.listFiles to get manageable portions of file listing.
File.list(filter)
File.listFiles