There are 2 problems about obtain paths need help.
Please help obtain the problem for both paths.
Question 1: how did the version number I obtained from the path change to "Version% 2019.0-J"?
var bPath = app.scriptPreferences.scriptsFolder.parent.parent;
var Version = bPath.parent.name;
alert(Version);
The space has become %20, which should be the "Version 19.0-J" in the path.
Question 2: How to obtain the location of ocalCaches in Windows?
C:\Users\ooloo\AppData\Local\Adobe\InDesign\Version 19.0-J\zh_CN\Caches
I wrote it like this, it doesn't seem right.
It's also good to be able to obtain a username.
var Version = bPath.parent.name;
var bPath = app.scriptPreferences.scriptsFolder.parent.parent;
//var localCaches = "%USERPROFILE%" + "\\AppData\\Local\\Adobe\\InDesign\\" + Version + "\\zh_CN\\Caches\\";
var localCaches =~"\\AppData\\Local\\Adobe\\InDesign\\" + Version + "\\zh_CN\\Caches\\";
alert(localCaches );
