I can think of three possible explanations for what you are seeing:
It could be a broken short-cut. The javadoc for exists()
says:
Tests whether the file or directory denoted by this abstract pathname exists.
If the pathname is the name of a broken symbolic link, then the file or directory denoted by the path does not exist. (And if you attempted to open it in Java, you would get an IOException.)
The application does not have sufficient permission to see the file. For instance, if the permissions on FolderA
were such that the program couldn't read it, exists()
would have to return false
for the entire path.
Somehow you have managed to get a funky character into either the pathname of the file as stored in the file system, or the Java string literal in your program. There are certain Unicode characters in different western alphabets that look like Latin letters (a-z, A-Z) ... but aren't. These can be hard to spot, depending on the glyphs used to display the respective characters.
The first two theories can be tested by inspecting the files and directories involved.
The third one will entail examining your source code and a directory listing using some tool that can render the respective characters as hexadecimal.
It would also be worth seeing what happens if you try to open the pathname (for reading) from Java, and in (say) Notepad.