Skip to main content
Inspiring
March 8, 2019
Answered

Get path to script

  • March 8, 2019
  • 1 reply
  • 2924 views

Hello.

I have a small script which prints the path to the script:

     var scriptFile = new File($.fileName);

     var scriptPath = scriptFile.parent.fsName;

     alert(scriptPath);

This returns the following path: C:\jonathan.sundberg\AppData\Roaming\Adobe\CEP\extensions\jsx\ai

The actual location of my jsx script is : C:\project\TechArt\adobe\extensions\jsx\ai

Why am i getting a temp path to AppData? And how do i get the real path to my scripts .jsx file?

This topic has been closed for replies.
Correct answer JojjeS

I found the problem, I was using symlinks to recreate the .jsx file in the appdata location

1 reply

JojjeSAuthorCorrect answer
Inspiring
March 8, 2019

I found the problem, I was using symlinks to recreate the .jsx file in the appdata location