in reply to Read first line from each file in a directory

Let's summarize the problems:

Fix those things and see how it goes.

Update: At Not_A_Number's request/suggestion I'm updating to add the very good points mentioned by MidLifeXis and toolic.

That gives you a total of eight "bullet points" to work on. Once they're resolved, assuming some other problem hasn't been introduced in the process, you'll be on track.


Dave