in reply to Extract information from several files in directory
I have previously managed to do this with one file
That's a good place to start. Might I suggest the following approach to help extend this to several files?
Portioning up the code into smaller blocks (such as using subroutines) helps you to work on small parts of a larger problem in isolation. If you have specific problems with any particular part feel free to ask. Remember that an SSCCE is best. Good luck.