Skip to main content
parseeker
Participant
August 29, 2017
Answered

Trouble with naming files when saving

  • August 29, 2017
  • 1 reply
  • 735 views

I recently switched to Photoshop CC 2017 from CS6.  When I am working on an image I often end up saving several different versions as I go along and typically just add a 1, 2, 3 etc. to the end of the file name so they don't overwrite one another.  CS6 would change the name of the image each time I saved a new version so that I was always working on the most recent one.  CC 2017, however, keeps reverting the file name back to the original without any numbers which makes me lose track of what number save I'm on and occasionally to overwrite files by accident. 

Is there anyway to change the way the filename shows up so that it works the same as it did in CS6?  I realize this might be a problem unique to the work I do, but appreciate any help.

    This topic has been closed for replies.
    Correct answer Stephen Marsh

    Not an exact attempt to directly answer your question… however a script to save an incrementally named JPEG copy of the source image can be found here:

    How to incrementally save images using a hotkey

    Filename.psd

    Filename_001.jpg

    Filename_002.jpg

    etc…

    It should be “easy enough” to hack the script into saving a different file format, such as PSD, TIFF etc.

    1 reply

    Stephen Marsh
    Community Expert
    Stephen MarshCommunity ExpertCorrect answer
    Community Expert
    August 29, 2017

    Not an exact attempt to directly answer your question… however a script to save an incrementally named JPEG copy of the source image can be found here:

    How to incrementally save images using a hotkey

    Filename.psd

    Filename_001.jpg

    Filename_002.jpg

    etc…

    It should be “easy enough” to hack the script into saving a different file format, such as PSD, TIFF etc.

    Stephen Marsh
    Community Expert
    Community Expert
    August 29, 2017

    Here is a copy of the incremental JPEG save script that I just hacked into saving out a PSD file:

    // https://forums.adobe.com/message/4453915#4453915

    #target photoshop

    main();

    function main(){

    if(!documents.length) return;

    var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');

    try{

    var savePath = activeDocument.path;

    }catch(e){

        alert("You must save this document first!");

        }

    var fileList= savePath.getFiles(Name +"*.psd").sort().reverse();

    var Suffix = 0;

    if(fileList.length){

        Suffix = Number(fileList[0].name.replace(/\.[^\.]+$/, '').match(/\d+$/));

    }

    Suffix= zeroPad(Suffix + 1, 3);

    var saveFile = File(savePath + "/" + Name + "_" + Suffix + ".psd");

    SavePSD(saveFile);

    }

    function SavePSD(saveFile){  

    // http://jongware.mit.edu/pscs5js_html/psjscs5/pc_PhotoshopSaveOptions.html

    psdSaveOptions = new PhotoshopSaveOptions();  

    psdSaveOptions.embedColorProfile = true;  

    psdSaveOptions.alphaChannels = true;   

    psdSaveOptions.layers = true;

    psdSaveOptions.annotations = true;

    psdSaveOptions.spotColors = true;

    activeDocument.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);  

    };

    function zeroPad(n, s) {

       n = n.toString();

       while (n.length < s)  n = '0' + n;

       return n;

    };