Extendscript current script path

Alagu picture Alagu · May 16, 2012 · Viewed 15.2k times · Source

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

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

Answer

Alagu picture Alagu · May 17, 2012

Found it myself, it is $.fileName

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