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

Find preferences files through CEP / ExtendScript

Contributor ,
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

219

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
Community Beginner ,
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

Votes

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

Copy link to clipboard

Copied

LATEST

Thank you!

Votes

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