Run extendscript from uxp

To handle automated saving for plugins my approach is to build a settings page (I usually render it in a dialog triggered from the flyout menu), which has a file picker to define a root working folder. I then create a persistent token with the result and write it to a .json file in the plugin storage folder. That only needs to be done once on plugin install and then via that token I have full access permissions for that folder and all its descendants.
That settings.json file also stores any other persistent settings for the plugin and is loaded on plugin initialisation.

You have to programmatically generate new tokens for specific save functions etc, but with that root level persistent token it can all be done silently and without user input.
This thread is how I figured it out:

In my personal use case I have the folder set as the root of an internal HDD that I only use for file storage. For an enterprise client I’ve used the same approach to allow them to define multiple network drives simultaneously (e.g. web-ready, design assets, archive, etc).

2 Likes