When you post code, please do so using [code] tags. This inproves readability to preserving whitespace and using a fixed width font.
You can iterate over files like this:
for thisfile in *; do
if test -f "$thisfile" -a -x "$thisfile"; then
echo "executable file: $thisfile"
echo "not executable or not file: $thisfile"
You can modify the pattern * to examine only some sub-set of files in the directory, e.g.
for thisfile in *.txt; do
...to examine only files with a name ending in ".txt".