Find preferences files through CEP / ExtendScript

Participant ,
Apr 20, 2022 Apr 20, 2022

Copy link to clipboard

Copied

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.

TOPICS
Scripting

Views

79

Likes

Translate

Translate

Report

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
New Here ,
Apr 21, 2022 Apr 21, 2022

Copy link to clipboard

Copied

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. 

 

AE.png

Likes

Translate

Translate

Report

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
Participant ,
Apr 22, 2022 Apr 22, 2022

Copy link to clipboard

Copied

LATEST

Thank you!

Likes

Translate

Translate

Report

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