I think it might be easier to manually rename the files or manually re-link them in the InDesign file.
But if you think that's too difficult how many images are you talking about, 10,000?
To automate such a job requires specific details, you would need to correlate the old name with the new in a repeatable process. If you have random changes throughout the folder I don't think it's possible for a script to guess what file should be what name. In order to know if this is possible we'd need to know:
Examples of old and new names.
Are the differences from old to new constant for all files?
Thanks for your reply,
The files themselves would be identical, but only be named differently, so I would think the script could analyze the data and match each file that way. Make sense? So are you telling me this simply isn't possible?
There is the LinkMetadata class but you'd have to have a point of reference to compare the old with the new files. I honestly can't see how it would be implemented if this information wasn't captured in the first place. Perhaps someone else on the forum can help but I'm guessing the workflow might be against you. Sorry I couldn't be of more help on this one.
Thanks Brett, no problem.
I'm not a scripter, but in my mind if the file data is identical it should at least be possible, so hopefully someone will post to give me a solution.
If the new file name is completely different from the old file name, I don't think you can solve this using scripting. If there is a clear pattern how the file names were changed, than you can do this using a script. A pattern can be: Removed all spaced in the name, changed all uppercase letters to lowercase, added some text in front of the name... Could you tell us how the names were changed ? Is the pattern the same for all the files ?
Do any backups exist with the not renamed files placed in InDesign?
In ExtendScript we could do a side by side comparison of named vs. renamed files using the File Object and we can only hope to find perfect matches for:
length number r/w The size of the file in bytes
created Date readonly The creation date of the referenced file
modified Date readonly The date of the referenced file's last modification
Maybe doing some more tests using PhotoShop reading out the width and height in pixels, used color space or doing a pixel by pixel comparison (color values).
Hi Uwe, thanks for your response,
to address your criteria, the length is what can be perfectly matched. The renamed files would have the exact same byte sizes.
And John their is no pattern to the renaming... i.e. 'img3000.jpg' could be named '2_Door_Night_Stand.jpg' now.
I think, the value of "length" alone is a very weak criterium for a perfect match.
Is there a difference in "created" and "modified" ?
At least "created" should match as well.
Hey Uwe, sorry for the delay in responding..
Yes, "created" would be a match, but "modified" would not. This is a furniture catalog. Images went from DSC001.jpg, DSC002.jpg, DSC003.jpg to possibly night_stand.jpg, bed.jpg, and dresser.jpg respectively.
Hi, What I would certainly check asap, does any of the pictures has the original file name stored as XMP meta data into the file.If the pictures do contain the orginale name in the XMP header, I would try to relink every image based on that embed information...
If not, I think your best option is to brew up a fresh pot of coffee, find a long playlist with your favorite music, and start relinking them manually....
I'm a bit late to the party so you've probably sorted, and I am no expert, but I had to do this with a catalogue I'm working on - I renamed the images from within indesign using Tomaxxi Link Rename - which still requires I rename manually but it automatically updates the indesign links as I do it - so rather than doing it outside of indesign and having to find and relink, you just do it within indesign and it renames and relinks.
I do not know the details about the differences in the names of these files.
I also find it difficult to find stable variables enough to build a reliable script.
You could use an automatic renamer. Something like NameChanger and consider renaming leaving with the same names all new or old files or leave like another.
Then let them in different folders. After that relink to Folder by indesign.
I hope to have help with some light on the horizon.
I too am trying to rename a lot of images in a catalogue. Currently, going to link, edit link, save as, relink, delete old image. Very time consuming. Can you explain to a lay man where "Tomaxxi Link Rename" is? I'm sorry for being a newbie but I'm tearing my hair out (or would be if I had any) renaming what should be already named files.
Thanks in advance.
Yep I'm a newbie too! I have had a look online but actually can't see his site any more or a link to the script - I have the script, am I allowed to email it to you to use? Only as I am not sure of the protocol on these forums as I've never used them before - can't see a way to upload it for you here - either way once you have it, you just need to put it in the scripts/scripts panel folder - and it should appear and then just click on image you want to rename, double click the script, then give it the new name - it changes the file and the link at the same time so very easy to use. not sure how you send me your email without everybody else seeing it either - if you want to message me it perhaps I can send outside of this forum?
Sounds like it might be easiest to create a 2-column Excel. In the first column, paste the name of the original link. In the second column, paste the name (full path) of the replacement link. I think it's a lot easier and quicker to copy/paste into Excel than to play around with InDesign.
Then, it would be fairly straightforward to write a script to batch replace the links according to the Excel file.
Just my 2c. Could be if there was more information/screenshots we could think of a more automated way.
Sounds like it should be doable.
Unfortunately I work for a French PLC, so I would have to go through my IT department in France to download / add anything. I googled Tomaxxi Link rename and think I got the same down message you got. I will speak with my IT department and get an answer by Christmas. But thanks for the info. It means I know there is a quicker way, I just have to get them to add the plug in for me!!!
If you can copy/paste text, you don't need to download anything. Just copy/paste the text of the script into ExtendScript toolkit (which is almost certainly already installed on your computer), and you're good to go.
Excuse my ignorance. Is the ExtendScript toolkit within InDesign? If so where?
If not, this would result in me having to re-link the images one by one, which would save a bit of time, but would be just as mind numbing!
The ExtendScript Toolkit is a separate application that is used to edit scripts that run on Adobe applications.
It's almost certainly installed already on your computer.
One quick way to launch it would be to open the scripts panel in InDesign (Window>Automation>Scripts), right-click on a script that's already there, and select Edit. This should cause the script to open up in ESTK.