When I tried giving the absolute path as the path to the file, f.exists() still returns false. What is the path you're specifying? Can you show the code for this?
One possibility is if you use '\' in the path and neglect to escape it as '\\'.
Probably you need to look very carefully at the path; there may be a tiny error somewhere. You can also break the path up and
test for existence of each part. E.g. if the path is
"c:\\foo\\bar\\baz\\test.txt"
try testing for the existence of each of these:
"c:\\"
"c:\\foo\\"
"c:\\foo\\bar\\"
"c:\\foo\\bar\\baz\\"
"c:\\foo\\bar\\baz\\test.txt"
This approach may help narrow down where the problem is.