check if file exists in a mounted windows shared folder

hi,

I posted a thread before on that subject, but with a wrong focus...

here's my problem: I want to check if a file exists in a windows shared folder mounted using:

sudo mount -t cifs -o username=xxx,password=xxx,uid=xxx,gid=xxx //192.168.0.92/public /media/92_shared

I tried

if [ -e "$file" ]

but it does a non case-sensitive check, probably because windows is not case-sensitive, while I need an exact match.

Any suggestion?

thanks

jul

If you need a case sensitive check on a filesystem that is not case sensitive, you'll have to do it outside of the shell's filesystem functions.
I'd suggest doing an ls -1 $file | grep $file
There's still room to get a false positive but you can refine your grep if needs be.

ls -l | grep -w $file