How to access a file in the same folder as the exported version of a project

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jgee_23_

Im making a server and I have some files that I would like to keep outside the exported version as I want to be able to change the values in it, but Im not sure how to access the files from the project.

So what Im asking is: How do I open a file exactly above the res:// folder?

If the answer is in c# it would be greatly appreciated :slight_smile:

:bust_in_silhouette: Reply From: jgee_23_

I got it working. For anyone with the same question, this is all you have to do to get the exported project location:

string dir = OS.GetExecutablePath().Replace("\\", "/"); dir = dir.Remove(dir.LastIndexOf('/'));

If you run this in the editor, this will give you your Godot.exe’s location. For the editor, use this: