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.
var Name = app.activeDocument.name;
if (Name.indexOf(".") != -1 ) Name=Name.substr(0,Name.lastIndexOf("."));
filePath = app.activeDocument.path + '/' + Name + '.png';
- Just wow
- May i call You General?!? ;-)
- Thank You!