Action to Save File with sequenced numbers

Community Beginner ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

I would like to create an action that saves the .psd file I'm working on several times (without saving the .psd file) as a .jpeg with same name+number (next one, same name+next higher number) and so on. Any way to do this?

TOPICS
Actions and scripting

Views

783

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Community Professional , May 12, 2022 May 12, 2022
This isn't possible with an action, but it can be done with a script. There are many to be found in the forum via search using keywords such as "sequential" or "incremental". One recent such topic with a great full-featured script can be found here: https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-copy-incrementally-with-javascript-in-photoshop/m-p/12616102 More here: https://community.adobe.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&filter=location&location=forum-board:photoshop&q=incremental%20save...

Likes

Translate

Translate
LEGEND , May 13, 2022 May 13, 2022
fN = (fls = File((aD = activeDocument).path).getFiles('*.jpg') .sort(function(v1, v2) {return v1.modified < v2.modified})).length ? File(String(fls[0]).replace(/(\d+|)(?=\.jpg$)/i, function(_, v){return +v + 1})) : aD.fullName, (jpg = new JPEGSaveOptions).quality = 12, aD.saveAs(fN, jpg, true)

Likes

Translate

Translate
Adobe Community Professional ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

This isn't possible with an action, but it can be done with a script.

 

There are many to be found in the forum via search using keywords such as "sequential" or "incremental".

 

One recent such topic with a great full-featured script can be found here:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-copy-incrementally-with-javascri...

 

More here:

 

https://community.adobe.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&...

 

https://community.adobe.com/t5/forums/searchpage/tab/message?filter=location&q=sequential%20save&noS...

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

Thank You!!
Nancy


[ private informations removed by moderator for security reasons ]

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

Your welcome, please mark my reply as the correct answer if it closes off and resolves your original post/question.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 13, 2022 May 13, 2022

Copy link to clipboard

Copied

I like these users that mark as correct answer the one you less likely expect as correct 😉

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 13, 2022 May 13, 2022

Copy link to clipboard

Copied

Sorry. I'm way in over my head -- don't really know what is best one.
Thank you anyway
Nancy



[ private informations removed by moderator for security reasons ]

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 13, 2022 May 13, 2022

Copy link to clipboard

Copied

LATEST

The best is that you can use for your problem. Did you try my script?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 13, 2022 May 13, 2022

Copy link to clipboard

Copied

 

fN = (fls = File((aD = activeDocument).path).getFiles('*.jpg')
.sort(function(v1, v2) {return v1.modified < v2.modified})).length ? 
File(String(fls[0]).replace(/(\d+|)(?=\.jpg$)/i, function(_, v){return +v + 1}))
: aD.fullName, (jpg = new JPEGSaveOptions).quality = 12, aD.saveAs(fN, jpg, true)

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines