Also, if you are using a Unix platform, you'd probably be better off using the -x (can be executed) file test rather than -e (exists).
In reply to Re: Which by httptech in thread Which by ChOas