in reply to Run a script on every file in a directory

What is the best way to do this?
The best way probably depends a lot on what your files look like and what you are going to do to them. Does best mean:

If all you want to do is print out lines of files which match the string 'foo', Unix grep would be a good choice:

grep foo dir/*
If you provide more details, you will surely get good advice from our fellow Monks (maybe even me:)