how can I link the filename to the visible layer?

Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

I am using "Actions" to apply patches to the posters. Each poster must have the same title + _language

LAYERS.jpg 

 

I have to save the JPG in a separate folder every time, and then rename and move it to the same folder

 

FOLDERS.jpg

TOPICS
Actions and scripting

Views

672

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 18, 2021 May 18, 2021

Copy link to clipboard

Copied

I am using "Actions" to apply patches add badges to the posters.

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 18, 2021 May 18, 2021

Copy link to clipboard

Copied

  • To Automate that you would need to use Photoshop Scripting. Actions can not use logic to generate file name for savings from layer names. if all your poster documents have the same structure you could likely script a batch processor that save file with names like Poster Name - Layer Name .
JJMack

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 18, 2021 May 18, 2021

Copy link to clipboard

Copied

 

with(activeDocument) saveAs(File(path + '/' + name
.replace(/(?=\.\w{3}$)/, '_' + activeLayer.name)))

 

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 18, 2021 May 18, 2021

Copy link to clipboard

Copied

@Сергій Марищук 

 

Are any of the replies so far helpful/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 19, 2021 May 19, 2021

Copy link to clipboard

Copied

Пока-что еще не разобрался, отпишу когда все обдумаю хоршо

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 19, 2021 May 19, 2021

Copy link to clipboard

Copied

LATEST

Have you tried my code?

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 18, 2021 May 18, 2021

Copy link to clipboard

Copied

Perhaps you can solve problem by using Window > Layer Comps but that option is requiring additional work to create layer comps although and that can be automated what depends on what exactly you need and whether group names are always the same.

 

If provided script works for you then you do not have many reasons to think about layer comps and File > Export > Layer Comps to Files.

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