2 Replies Latest reply on Apr 1, 2016 6:30 PM by photogyulai

    How to NOT save a file name extension ?!

    photogyulai Level 1

      Hey Everybody!

       

      I have a script for Photoshop >>  a little extension >> i click on a button and the script save the .jpg file into a png file  (with additional stuff "of course") in the same folder.

       

      Works like a charm ....

       

      But when this is the original filename :  example.jpg

       

      I get this png filename: example.jpg.png

       

      i save the filename and the path with this code:

      filePath = app.activeDocument.path + '/' + app.activeDocument.name; + '.png';
      

       

       

      The goal is to get rid of the  ".jpg"  section of the new file name.

       

      I tried to save the filename into a variable and then reduce the number of the characters or save it without the extension, but no luck yet.

       

      any ideas??!

       

      thank You!