in reply to Need help with creating a filename only array
'.' and '..' appear to be directories on my free Unix, so why not just do the -f test? I can't comment on the rest of your code, as I have no idea where the other variables come from.