You could do something like this. . .
if [[ $file == */]]; then
echo whatever
fi
Then again, this will only check for a string ending with a '/'.
What if the user enters '/etc' or '/usr/bin' for example?
I'm sure you can figure out how to modify the example to check for these as well.
BTW, you should check out the Advanced Bash-Scripting Guide hxxp: tldp. org/LDP/abs/html/
it also has a section on Regular Expressions.
kdb