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

Action challenge

New Here ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

Hi Community - can anyone help me, I want to know how I can instruct an action to:

1. Retrieve the filename of an open file

2. Set that filename (even better if I can parse it) as a layer name in another open file.

 

Many thanks

 

Paul

TOPICS
Actions and scripting

Views

112

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 Expert ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

This is a task for a script, not an action.

 

That being said, your description does not make a lot of sense to me...

 

You have file A and file B open and you wish for this file A name to be used as a layer name in file B? What if it was file B to file A? Is it renaming an existing layer, if so which one? Is it creating a new blank layer and in what position/order in the layer stack? Is it duplicating the layer name and image content from one file to another? Should the filename extension be removed?

 

There are more questions, but you hopefully get the idea.

 

if you can clearly and precisely define the step by step process then it can be scripted.

Votes

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 Expert ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

LATEST

Also Photoshop is a Document editor not a file editor. You can Save Image files from the document you are editing.  If the document you are editing was open from an Image file you can not change the document name. However if the document has not been save is a new Document there is no backing file  on disk. If you save an inage file photoshop may change the open document names it would be like you opened the saved image file to begin with the document has a backing file it is noe longet a new Document.  You cans save an image file in and support files format with any valid name. You will get a warning dialog I believe if the file you want to save exists.  As far as scripting goes Document Name is Read Only scripting can not change a document nane but can open a new document or existing document with any name. Layer names are not read only scripts can change a layers name.

image.png

JJMack

Votes

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