javascript extendscript get path to file 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(/^.*\./,'');