Search code examples
extendscript

Extendscript current script path


I want to get the absolute folder path of current running Extendscript.

i.e __DIR__ in php (or) __dirname in nodejs. Equivalent in Extendscript.


Solution

  • Found it myself, it is $.fileName

    For the folder name, it is (new File($.fileName)).parent