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

Removing the File Extension in the name so that it doesn't appear in IND when used as a variable

Enthusiast ,
Dec 19, 2017 Dec 19, 2017

Copy link to clipboard

Copied

Hello,

I am trying to use the Text variable feature in InDesign to bring in the Image Name of the placed PSD. However, I would like it to come in without the suffix.

I was thinking that if there was a way to save the PSD name without the extension, so that when it came into InDesign, that would be missing, but that will not work.

So, then I thought about using a dynamic caption instead of a variable. But I would need a way for the Metadata area of the PSD to have the name somewhere (like description or keywords area), to show the name without the file extension in it.

If anyone has any thoughts, I would greatly appreciate it. I will also be seeking script option, but if there is something within the program that would do this, that would be best,

Thank you,

Babs

Views

4.3K

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

correct answers 1 Correct answer

Community Expert , Dec 20, 2017 Dec 20, 2017

Hi Babs:

I'm still following along because I'd like to learn the answer to this question... and guess what! I got it to work!

I used the 3rd link in Stephen Marsh's post: Re: How to Batch copy filename to its metadata Title

  1. Went to the CC Desktop app and downloaded ExtendScript Toolkit
    Screenshot 2017-12-20 08.04.13.png
  2. Installed and opened it. Pasted in the script from the 2nd response in that thread and saved the script to my desktop.
  3. Opened Bridge CC 2018.
  4. Bridge > Prefs > Startup Scripts > Reveal my Startup Scripts and dragged the
...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 19, 2017 Dec 19, 2017

Copy link to clipboard

Copied

You could try renaming the file and strip  the .psd.  I do not install InDesign it may be able to place in a file without and extension it may be able to tell what kind of image file it is be looking at the files metadata. If not if InDesign has a scripting feature you may be able to rename the layer that is placed in.  Or look at all  layer name and strip know file extensions.

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
Enthusiast ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

Hello JJMack,

I did also attempt something like that, but InDesign still added the extension.. was definitely worth a shot!

thank you!
babs

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 ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

A common enough request Babs!

Here are some Adobe Bridge Scripts which will allow you to batch apply the filename without extension to multiple images:

https://forums.adobe.com/thread/656144 (Filename to Keywords)

CS5 Filename to Title Script | imagesimple​  (Filename to Title)

Re: How to Batch copy filename to its metadata Title  (Filename to Title)

Add filename to description​ (Filename to Description)

Prepression: Downloading and Installing Adobe Scripts

If you are comfortable with using the command line, this can also be easily performed using ExifTool.

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 ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

Another option would be to run a script to convert all text variables and or live captions to text, then apply a paragraph style that used a grep style (character) that would remove the extension by colouring it none:

\.[^\.]+$

This would not require you to set the filename to a metadata field, this is a purely InDesign solution.

https://indesignsecrets.com/topic/script-to-convert-all-text-variables

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
Enthusiast ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

Hi Stephen,

Thank you for your reply's...

One of the issues I am having with the Bridge options (I found a really cool one too), is there doesn't seem to be any script area in CC 2018? I have looked in Application Support and in the program, but they have no script options? at least not in the program anymore, from what can see...

I think your second option is what I am really looking for, as I have found a way to use GREP to rename all the Text to remove the file extensions, but would need to convert the variables to text, so I am going to look at your second reply, to try and achieve that.

Thank you so much for all of these!!

Babs

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 ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

Here is a visual of the process that I outlined in post #3:

grep-style.png

NOTE: If you use Static Captions rather than Live Captions, then you will not need to convert the Live Caption to text in order to apply the GREP style.

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 ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

Hi Babs:

I'm still following along because I'd like to learn the answer to this question... and guess what! I got it to work!

I used the 3rd link in Stephen Marsh's post: Re: How to Batch copy filename to its metadata Title

  1. Went to the CC Desktop app and downloaded ExtendScript Toolkit
    Screenshot 2017-12-20 08.04.13.png
  2. Installed and opened it. Pasted in the script from the 2nd response in that thread and saved the script to my desktop.
  3. Opened Bridge CC 2018.
  4. Bridge > Prefs > Startup Scripts > Reveal my Startup Scripts and dragged the file from the desktop into the open folder.
  5. Closed Bridge. Reopened and accepted Script.
  6. Selected image(s), then Tools > Add Filename to Title

Before running script:

Screenshot 2017-12-20 08.15.50.png

After running script:

Screenshot 2017-12-20 08.16.20.png

Now back to InDesign:

Screenshot 2017-12-20 08.25.57.pngScreenshot 2017-12-20 08.26.07.png

~Barb

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 ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

Excellent Barb!

Just a general note (I’m sure the Barb knows this) – any plain text editor will do for saving a script (notepad.exe on Windows or TextEdit.app on Mac). Just ensure that the filename extension is saved as .js or .jsx rather than .txt and check that straight quotes have not become curly.

The nice thing about ESTK is that it has scripting specific features such as syntax highlighting and debug etc… And the filename extension will be correct too!

Babs, my blogpost did cover downloading and installing scripts, it is just as easy as Barb demonstrates above:

http://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

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
Enthusiast ,
Dec 20, 2017 Dec 20, 2017

Copy link to clipboard

Copied

WOW~~

You are all amazing! This is terrific!

Going to start testing everything this weekend... There is so much information here, and I am loving it!
I may hicup a little on the script part, it has been awhile... But, I think I have what I need for now...

I can't wait to test this!

MANY MANY MANY THANKS!!!!

babs

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
Enthusiast ,
Dec 24, 2017 Dec 24, 2017

Copy link to clipboard

Copied

Hi Stephen,

Thank you so much for sharing your blogpost on installing scripts in all these applications.

very helpful! Working on getting this all to work now!

Cheers!

Babs

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
Enthusiast ,
Dec 24, 2017 Dec 24, 2017

Copy link to clipboard

Copied

LATEST

Hi Barb,

Your graphic is hysterical!! Many days how I feel

I think there is something going on with the 2018 versions... I don't even have the extenscript toolkit available in the apps downloads? But, I do remember them in earlier versions. I have tried to find everything I can on getting the scripts to show up in bridge CC 2018, but nothing seems to be doing anything..

I was able to get the variable to turn into text in InDesign with an AppleScript .. working on getting it to do the entire document not just what page I am on. It is just this right now and is working, then I can do my GREP find and Change and it will work.

tell application "Adobe InDesign CC 2018"

  tell application "Adobe InDesign CC 2018"'s document 1 to convert to text text variables

end tell

I really appreciate all the help and sorry it took so long to reply... Just need more computer time

Have a wonderful holiday!!!

Babs

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