Copy link to clipboard
Copied
I need to write log text files to a fixed location without user interaction.
Can this be done? If i'm not mistaking some versions of UXP did not allow this.
thanx
tm
Copy link to clipboard
Copied
Yes, it is possible; there are two solutions.
1. Give file access permission in manifest.json and write the file via UXP
In manifest.json, give file access permissions like this.
"requiredPermissions": {
"localFileSystem": "fullAccess"
},
The file path is generated by os.homedir() and path.
fs and localFileSystem are used to write and reference files.
2. Use doScript and write the file via ExtendScript