javascript extendscripts get current path code example
Example: get file extension of path extendscript
// Extract file name and extension from file object in ExtendScript
var myFileName = myFile.name.replace(/.[^.]+$/,'');
var myFileExt = myFile.name.replace(/^.*\./,'');