I would like to write to the file system in a directory C: \ directory name, for the moment I have this code:
but in this way writes on the application folder. How to fix it?
You can do:
Ensure your application has write access to the destination.