Write to Android folder external to game

I currently write to text file to a folder I set via FPATHS in Android however I want to write these txt files to an external folder that is not deleted if a new package is installed.

Any suggestions how I might do this as my C++ knowledge is very limited.

I tried below but I get a compile error which I don’t know how to fix