0

I have an A4 size document with 6 Photos, while I am trying to cut one photo from the original and create a new document the new file name is created as "Untitled-1".

Since I am using an Action to cut from original and paste it into the new document, every new file is opened with same name as "Untitled-1" and while saving it replaces the existing.

Is there any way to make every new document with sequence number in Photoshop?

Please find below screenshot for your clear understanding.

enter image description here

enter image description here

3
  • You could do it with a script.
    – Joonas
    Oct 20 '16 at 9:23
  • Hi Luciano, thanks. I am not aware about script, can you please provide the link for that. I have to cut and paste and save around 300 images. Oct 24 '16 at 15:54
  • Hi Joonas, since I am not aware about the script; can you please assist me how I can get the script. can you please share the script link. I have to cut and past and save around 3000 images. Oct 24 '16 at 15:58
1

I would fasten the action and the job by:

  1. action would be just "duplicate layer" when place is selected. In dropdown menu chose "new"
  2. Using Batch for saving files where you could set names and generate them by numbers.
0

This takes some setting up, but should do what you want.

The script finds out how many files you have in the output folder first. It then duplicates the current document with a new name based on the previous document and adds the number of files in the output folder at the end of the filename. If output folder is empty, the number is 0. So the naming scheme is something like:

  My photoshop document 0.jpg, 
  My photoshop document 1.jpg, 
  My photoshop document 2.jpg

Setting up the script:

  1. Save this script as .jsx file:

    var outputFolder = "/Users/joonas/Desktop/This be a test"; 
    var fileformat = "jpg";
    
    // ================================================
    
    var docName = app.activeDocument.name;
    var outputFilesLength = new Folder( outputFolder ).getFiles( '*.' + fileformat).length;
    
    app.activeDocument.duplicate( docName + " " + outputFilesLength );
    
    var newDoc = app.activeDocument;
    
    newDoc.flatten();
    newDoc.activeLayer.name = 'Background';
    newDoc.activeLayer.visible = false;
    

    Replace the variable outputFolder with the same output path that you got in the Save item of your Action. This folder should never have any other files, except the output files. Replace the variable fileformat with what ever file format you're saving to in the Save item of your Action.

  2. Remove Make item from your Action and replace it with a recording of you opening the script from: File > scripts > browse....

1
  • Slightly simpler way would be to get the current date and time ...and use that in the filename. It would potentially require renaming files later on and would definitely look a bit messy as all filenames would be pretty long, so I went with this one.
    – Joonas
    Oct 25 '16 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.