Copy link to clipboard
Copied
I've been through a number of threads already but none seem to answer my question. I also may not be understanding some of the answer correctly as I'm not very familiar with scripts. My file naming scheme needs to be changed from 2018_menu_a to menu_a_2018. I need to move the date to the end, sometimes the month and day are also listed. After I rename all of the files I will need to relink them in InDesign. The file(s) that I need to relink to are often the same across a number of documents. For example, the same background image used in a large number of InDesign files. The location of the files won't be changing.
Copy link to clipboard
Copied
Given your description, there is no bulk method I know of. Bridge can rename files in sequence, but, AFAIK, InDesign documents will have to be relinked one at a time.
Copy link to clipboard
Copied
Hi notchrisp ,
a sophisticated script could do this.
To work that out for a scripter it would be best or even necessary to give a complete list of file names that should be changed.
So my advice: Hire a scripter for that work.
If you want assist with developing a script develop a GREP find/replace scheme for renaming that would be the heart of the script.
I guess you already saw into Kasyan Servetski's script here ( scroll down to "Link" 😞
Scripts sorted by categories for InDesign
Regards,
Uwe
Copy link to clipboard
Copied
I'm moving this to the InDesign Scripting forum.
Copy link to clipboard
Copied
Because of your inquiry, I have added a blog post to my blog on scripting that covers the subject. You might be interested in the script that may prove helpful for your need to batch process image links. You can read the blog at http://yourscriptdoctor.com/blogs
Hope this proves helpful.
Copy link to clipboard
Copied
Take a look I to this code I made for a client: InDesign JavaScript by LFCorullón | Rename linked (or missing) files - YouTube
It allows you to rename linked files manually or based on a text file.
Copy link to clipboard
Copied
Not exactly what you are looking for, but it may help somebody else:
Copy link to clipboard
Copied
I hesitate to mention the following method, however for completeness here goes… Saving a copy of your file as IDML is not without risks, there are topic threads in the forum that mention some of the potential pitfalls and problems with IDML. One should first save as IDML and then open the IDML and save it as a INDD copy and ensure that there are no problems with the file, otherwise the following would be a waste of time.
1. Rename the .idml file extension to .zip
2. Using special software that allows opening/editing of .zip contents “in place” – edit the required XML files. I used a tool on the Mac called “Springy”, however there are others.
3. Editing the …Spreads\Spread_uc6.xml file using BBEdit, I used a regular expression find/replace to change the image names:
4. Editing the …META-INF\metadata.xml file using BBEdit, I used a similar but slightly different regular expression find/replace to change the image names:
5. After the XML edits, I renamed the .zip file back to .idml
6. Opening the edited IDML file, the links are now renamed and missing, which was the whole idea. Although I have only used 2 images in this example, the process is the same for 2000 images, as long as the original filenames match the regular expression, then the find/replace pattern can be used to mass update all links. Otherwise you will need to run separate find/replaces using different regular expressions to batch change all of the image names.
7. Using Bridge’s Batch Rename tool, rename the images using a string substitution regular expression:
8. Opening the same IDML file again into InDesign after renaming the images, the links are all good and no longer show warnings: