Howdy! I’m trying to do something fairly simple (I think), but can’t find a solution. I’ve made a game with Processing, exported it, and have moved it to a new directory outside of anything in the Processing folder. I run the game from a folder with a .exe and its accompanying asset folders and it works just fine. My problem now, however, is finding the location of the .exe on the computer. I could, of course, use the full file path, something that may look like “C:/games/myGame/save/data.dat”, but then I’d have to change the file path the program looks at every time I move the location of the .exe.
I’m aware you can use sketchPath() for finding the sketch folder the program is using, but I don’t think this works if you move the .exe out of the sketch folder. Is there a way to find the file path the .exe is running from? Maybe something like “(.exe is running in this file path)/save/data.dat”? (This may be more of a Windows Question than a Processing Question, lol)