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

name of the open file?

Participant ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

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

TOPICS
Windows

Views

343

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

Copy link to clipboard

Copied

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(/\.[^\.]+$/, '');

 

 

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

Copy link to clipboard

Copied

No, can the name be obtained without script also?

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

Is there no other option?

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

Copy link to clipboard

Copied

quote

Is there no other option?


By @MJ ST

 

¯\_(ツ)_/¯

 

alert(app.activeDocument.name);

 

I still feel as if I’m missing something!

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

Copy link to clipboard

Copied

Are there no other options besides scripts?

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

Because he doesn't seem to take action

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

Copy link to clipboard

Copied

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

 

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

Copy link to clipboard

Copied

LATEST

Hmm

 

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