Skip to main content
zsaaro
Inspiring
April 20, 2022
Question

Find preferences files through CEP / ExtendScript

  • April 20, 2022
  • 1 reply
  • 509 views

Is there a way to reach this address safely?

Users\USERNAME\AppData\Roaming\Adobe\After Effects\22.2

I know you can get to roaming by calling: 

getSystemPath(SystemPath.USER_DATA)

on CSInterface, but I want to make it specifically to where the preferences files are of the current version.

 

Is there some method that I can use? Or alternatively, read the preferences file in any other way?

I don't want to use "app.preferences.getPrefAsString" to read specific preferences.

 

Thank you.

This topic has been closed for replies.

1 reply

Participating Frequently
April 21, 2022

Considering, that Adobe has been following this pattern %appdata%\Adobe\After Effects\{major}.{minor} in the past, you could simply get the current app version (app.versionand extract major / minor version (see screenshot below). I'd verify that this pattern is kept on a few older versions on After Effects. Additionally you could implement a fallback by getting the subfolders of %appdata%\Adobe\After Effects\ choosing the folder that is closest to your current version. 

 

zsaaro
zsaaroAuthor
Inspiring
April 22, 2022

Thank you!