Won't "Saved Games" be different in different locales though?
I use https://forums.frontier.co.uk/showthread.php/289420-How-to-find-the-Saved-Games-directory-(C-) to obtain the relevant path, which should work regardless of the client's locale.
This. It's a hack, as usual for Microsoft, but it works. A cleaner way would of course be to have the localized path name in the registry, but it's hard to push for consistent design when over 1000 people work on a piece of software.
I'm going to put my stuff up on Github so you can just use my code for the entire file watching/reading part, and focus on the handling of the data.
EDIT: Project is now on Github at https://github.com/Toumal/EliteDMX
Localisation doesn't mater: W10 FR, if I point to %UserProfile%/Saved Games/Frontier Developments/Elite Dangerous/ it goes to c:\Yves\Parties Enregistrées\Frontier Developments\Elite Dangerous\
At least I know it work on Win7 Win8 Win10.
For the curious, I use nodeJS:
Code:
var Journalurl=process.env.USERPROFILE+"/Saved Games/Frontier Developments/Elite Dangerous/";