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

Script for relinking images that have all been named with the same (new) naming convention

Explorer ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

Hi there,

 

For my job, I have to convert files that clients give me (generally jpegs) into tiffs, and we usually use the same naming convention when converting - see below

From client: Image01.jpg, Image02.jpg, Image03.jpg

Once we convert: Image01_TEAM.tif, Image02_TEAM.tif, Image03_TEAM.tif

 

Is there a way to "relink all to folder" and set the extension to look for +"_TEAM.tif"?

 

Does this make sense?

 

Thank you!

TOPICS
How to , Import and export , Performance , Scripting

Views

2.6K

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 2 Correct answers

Community Expert , May 14, 2020 May 14, 2020

Have a look at the following discussion

https://community.adobe.com/t5/indesign/relink-images-with-different-names/td-p/6822301?page=1

 

This is almost the same as you need, just change the following line

cFile = File(sourceFolder + "/" + cLink.name.replace("LR.","HR.") );

to 

cFile = File(sourceFolder + "/" + cLink.name.replace(/\..*/, "_123.tif") );

 

-Manan

Votes

Translate

Translate
Community Expert , May 14, 2020 May 14, 2020

Hmm, in that case if the solution works for you Ethan than you know what changes need to be made in the replace statement.

cFile = File(sourceFolder + "/" + cLink.name.replace(/\..*/, "_TEAM.tif") );

-Manan

Votes

Translate

Translate
Enthusiast ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

Unless you need to include this as part of another script, this can be done a couple of ways from from the Links panel.

 

1. In the Links panel, select all images to relink, choose Relink to Folder in the panel menu, and in the dialog, click on the Options button in the lower left, then choose Match same file name but this extension: tif

Screenshot 2020-05-12 10.08.38.png

 

OR, if the images are in the same folder as the originals,

 

2. In the Links panel, select all images to relink, choose Relink File Extension in the panel menu, and in the dialog, set Relink to Filename Extension: tif

Screenshot 2020-05-12 10.08.09.png

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 ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

The issue is that their filename is changing. 

 

Ethan, this is doable via script. I don't know of an existing script that does it, though. Happy to discuss developing one for a nominal fee. Feel free to PM. 

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 ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

Ah, yep, I misread the original file name info.

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
Guru ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

I use another approach: our designers usually place JPEGs, sometimes PNGs and GIFs.

So, I wrote a script that resaves the selected linked image as PSD with a possibility to change the file name.

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
Explorer ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Hi Kasyan,

 

Your script is super close, the only thing is all of the images will already be renamed / replaced by my colleagues

 

so in Links instead of img01.jpg it will now be img01_TEAM.tif

 

That's the most likely going to be the case...

Still browsing the web for this one

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 ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Have a look at the following discussion which seems to be the same with just cosmetic changes

https://community.adobe.com/t5/indesign/script-that-will-relink-based-on-naming-convention/m-p/11130...

 

-Manan

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
Explorer ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Hello,

 

I'm looking for a script that will relink images that have all been renamed in the same way. See below:

 

IMG01.jpg > IMG01_123.tif

IMG02.png > IMG02_123.tif

IMG03.jpg > IMG03_123.tif

IMG04.jpg > IMG04_123.tif

 

Basically, we rename everything the same way and convert all to tiff. What i'm looking for is a script that will allow me to have the relink window search for _123.tif instead of just searching for .tif

 

Does this make sense? I can't find anything like this online

 

Thanks

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 ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Hi,

I think this question is same as your earlier question below

 

https://community.adobe.com/t5/indesign/script-for-relinking-images-that-have-all-been-named-with-th...

 

Seeing difference only for _TEAM.tif in above post and _123.tif here.

 

Thanks.

Best regards

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 ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Hmm, in that case if the solution works for you Ethan than you know what changes need to be made in the replace statement.

cFile = File(sourceFolder + "/" + cLink.name.replace(/\..*/, "_TEAM.tif") );

-Manan

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
Explorer ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

LATEST

Worth 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 ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Have a look at the following discussion

https://community.adobe.com/t5/indesign/relink-images-with-different-names/td-p/6822301?page=1

 

This is almost the same as you need, just change the following line

cFile = File(sourceFolder + "/" + cLink.name.replace("LR.","HR.") );

to 

cFile = File(sourceFolder + "/" + cLink.name.replace(/\..*/, "_123.tif") );

 

-Manan

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