Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

UXP - How to write file to fixed location?

Contributor ,
Apr 23, 2024 Apr 23, 2024

 

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

 

TOPICS
UXP Scripting
240
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 24, 2024 Apr 24, 2024
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines