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

name of the open file?

Contributor ,
Feb 08, 2024 Feb 08, 2024

Tell me the name of the open file? In photoshop.   Where can I find a name like Photoshop Contactsheet?

TOPICS
Windows
718
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
Adobe
Community Expert ,
Feb 08, 2024 Feb 08, 2024

What is the context? What ate you wishing to do?

 

Your last post was about creating a script from an action... So is this a scripting question?

 

If so:

 

 

app.activeDocument.name;

 

Or to remove the filename extension, one method is:

 

app.activeDocument.name.replace(/\.[^\.]+$/, '');

 

 

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
Contributor ,
Feb 08, 2024 Feb 08, 2024

No, can the name be obtained without script also?

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 ,
Feb 08, 2024 Feb 08, 2024

One answer is on the tab if viewing in tab mode, or the title bar for a document in a floating window.

 

Or the bottom of the Window menu, where the active document will have a tick/check mark next to it.

 

I get the feeling that I'm not understanding as these are very obvious answers.

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
Contributor ,
Feb 08, 2024 Feb 08, 2024

You are right. But I also want to copy it.

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 ,
Feb 08, 2024 Feb 08, 2024
quote

But I also want to copy it.


By @MJ ST

 

Image > Duplicate

 

or

 

// Copy Active Document Name with Extension to Clipboard
#target photoshop 
var doc = app.activeDocument.name;
var d = new ActionDescriptor();  
d.putString(stringIDToTypeID("textData"), doc);  
executeAction(stringIDToTypeID("textToClipboard"), d, DialogModes.NO);
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
Contributor ,
Feb 08, 2024 Feb 08, 2024

Is there no other option?

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 ,
Feb 08, 2024 Feb 08, 2024
quote

Is there no other option?


By @MJ ST

 

¯\_(ツ)_/¯

 

alert(app.activeDocument.name);

 

I still feel as if I’m missing something!

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
Contributor ,
Feb 08, 2024 Feb 08, 2024

Are there no other options besides scripts?

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 ,
Feb 08, 2024 Feb 08, 2024

What was wrong with manually copying the name from the native window of the Image > Duplicate command? 

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
Contributor ,
Feb 08, 2024 Feb 08, 2024

Because he doesn't seem to take action

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 ,
Feb 08, 2024 Feb 08, 2024
quote

Because he doesn't seem to take action


By @MJ ST


No, actions can't copy the document name (without the help of a 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
Contributor ,
Feb 08, 2024 Feb 08, 2024
LATEST

Hmm

 

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