Obtenha a extensão do arquivo do caminho ExtendScript
// Extract file name and extension from file object in ExtendScript
var myFileName = myFile.name.replace(/.[^.]+$/,'');
var myFileExt = myFile.name.replace(/^.*\./,'');
Confused Sphere