// Extract file name and extension from file object in ExtendScript var myFileName = myFile.name.replace(/.[^.]+$/,''); var myFileExt = myFile.name.replace(/^.*./,'');