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

Changing Document Name of unsaved File

Community Beginner ,
Jul 24, 2009 Jul 24, 2009

Hi,

is it possible to change the name of an opened but not saved document?

If I open a photo from ACR as an object, PS will append "as object" to the document name.

I'd like to delete that part of the document name, BEFORE it will be saved.

Or is there another way to do that?

app.activeDocument.name is read only...

Thanks!

TOPICS
Actions and scripting
1.2K
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 1 Correct answer

Advisor , Jul 24, 2009 Jul 24, 2009

Try this:

-X

var original = app.activeDocument;

var newDoc = original.duplicate(original.name.replace(' as object', ''));

original.close(SaveOptions.DONOTSAVECHANGES);

Translate
Adobe
Advisor ,
Jul 24, 2009 Jul 24, 2009

Try this:

-X

var original = app.activeDocument;

var newDoc = original.duplicate(original.name.replace(' as object', ''));

original.close(SaveOptions.DONOTSAVECHANGES);

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 ,
Jul 28, 2009 Jul 28, 2009
LATEST

@ xbytor2:

Works perfect, thanks!!

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
Guru ,
Jul 24, 2009 Jul 24, 2009

If all you want to do is edit the name of the saved file then you could just do a saveAs and edit the name.

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