in reply to Reading all the files in the directory

Since you have not shown any code, I will assume you are just looking for an approach/algorithm:
  • Comment on Re: Reading all the files in the directory