cd $InputDirectory for file in *_original.shp do base=`basename $file _original.shp` if [ -e ${base}_Update.shp ] then *runs translation fi done