I am trying to access a text file, `output.txt` which is inside a project folder. The image below shows the folder structure.

[![enter image description here](https://i.stack.imgur.com/7o7Zs.png)](https://i.stack.imgur.com/7o7Zs.png)

```
String file=".\\testFiles\\output.txt";
BufferedReader br=new BufferedReader(new FileReader(file));

```

When I try to access that file using the code above, I get the following exception.

```
 java.io.FileNotFoundException: .\testFiles\output.txt (No such file or directory)

```

I have tried different file path formats but none have worked. I think the problem is with the file path format.

Thanks in advance.