Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Action to Save File with sequenced numbers

Community Beginner ,
May 12, 2022 May 12, 2022

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
2.7K
Translate
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

Community Expert , 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

...
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)

 

Translate
Adobe
Community Expert ,
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-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...

 

Translate
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

Thank You!!
Nancy


[ private informations removed by moderator for security reasons ]

Translate
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 Expert ,
May 12, 2022 May 12, 2022

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

Translate
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

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

Translate
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

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 ]

Translate
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
LATEST

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

Translate
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

 

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)

 

Translate
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