2013-03-17, 21:03
If you only want to test the existence of the file, why don't you use:
os.path.basename gives the filename and os.path.dirname the complete path without the filename.
Code:
count = MPDB.RequestWithBinds("select count(*) from files where strFilename = ? and strPath = ? ", (os.path.basename(VarWithFullPathToPicture ), os.path.dirname(VarWithFullPathToPicture ) ) )[0][0]