Create a List of Linked Files
“How can I export a list of all the images I’ve placed into my InDesign CS4 file?” asked one of the attendees at the InDesign Conference (winding up today in Washington DC) yesterday. “I need to send a text file of these to my client’s vendor with every job.”
Mike Ninness was on the stage, pausing between tips he was demo-ing for his “Power Keyboard Shortcuts” session, and started looking around the interface. A Print icon in the Links panel status bar? No. An “Export Link Names” command in the Links panel menu? No.
In InDesign CS3, the attendee said, she could copy each link name one by one from the Link Information dialog box and paste them into a text file. But you can’t do that with CS4’s Link Info panel.
Mike was ultimately unsuccessful, and none of the suggestions other audience members (including myself) suggested were entirely satisfactory. The closest we came to a solution was another attendee’s suggestion to choose File > Package, click the Report button, then click the Cancel button to cancel the package. InDesign still creates a Package Report text file which lists every image used in the file, which is good, but the names are buried in lots of other information for each linked file, which was not the push button solution the first attendee was hoping for.
Noha to the Rescue
Luckily, Noha Edell (Adobe’s wonder woman of the east coast) was in the audience, and she remembered that at a recent Washington D.C. InDesign user group meeting, someone had demo’d a script that came close to what the conference attendee needed. Noha e-mailed the user group member last night and asked him if he could tweak the script and send it on so she could make it available to the conference audience (via this post to InDesignSecrets) today.
So … we aim to please! You can download imagescripts.zip and then unzip the file. You’ll have two AppleScripts (sorry Windows users) written by Hanaan Rosenthal that you can drop into your InDesign Scripts folder.
Then, when you want to create a text file of the filenames in your Links panel, open your Scripts panel (Window > Automation > Scripts) and double-click either Print Links Simple.scpt or Print Links Advanced.scpt entry to generate a text file.
On the left is the result of the Simple script, on the right the result of the Advanced script. So, thank you Noha and Hanaan!
Hello,
Perhaps this script, due to Loïc Aigon (Link report to CSV) do the same think (Get a CSV file reporting all the data about the graphic files used in your Indesign document for further analysis) for Windows users. You can find it here : https://loicaigon.com/en/auto.php
(Automation > Scripting > 9/10)
Best
Thank you! Thank you! Thank you! What a great script!
Another thing that would work would be to autotag the document via the tags panel, export the XML, and run a little XSLT to tease out all the figure elements. You’d have the file name and path, but not the format and size.
A truly righteous solution would be a little Flex reporting app that could query IDML from a document. You could select any combination of placed graphics parameters and tell it to output a report listing them. Man, I gotta learn Flex. I can picture all this stuff, but I can’t make it!
I found a script that can do this just a couple days ago on your site.
LinkExportPro which also lists page numbers and file path.
https://creativepro.com/downloads/LinkExport_Pro1a_EN.jsx
This script seems to break if there are images placed in Master pages
Does this script still work in InDesign CC 2017? If yes, how do you activate it? do you drop into a folder somewhere? A little more background would be greatly helpful!! thanks David
Joe … weird! It must be buried in a comment someplace. Thanks for the heads up.
I just tried it, and you’re right, it works fine, especially if you need that extra info. If you don’t, it just takes a few seconds to delete the extraneous information line by line. (I think I’d be inclined just to use the Simple script above in that case.)
I’m glad the script’s tooltip told me where to look for the text file though (same folder as layout file). I had been hunting for awhile. ;-)
For more information and script options see this 2007 post and Steve Wareham’s ListLinks script (which is, I think, also included in the Blatner Tools public beta, under the Extras menu… or if it’s not yet, then it will be in the final release).
I’m the attendee that made the query about the ability to generate the list of images. And the script created ROCKS. It’s exactly what I wanted, simply and straight forward.
It’s no fuss, no muss and none of that superfluous information that other methods produced.
Thank You.
OK… how about a Part 2 for this: Hyperlinks.
I had a large project and the client was curious how many hyperlinks were included. (There were around 100 or so across different documents in the book.)
I would have thought there was an easy way to get this info either in InDesign or even Acrobat without staring at the Hyperlinks panel and counting links.
The closest I found was some sort of voodoo that you needed to do in Terminal.
When I’m at my work computer, maybe I’ll find that Package does do that. Or am I just missing something obvious?
Patricia, you’re welcome! I knew you were after the “no fuss” method. ;-) Glad it worked out.
Mike, I don’t know of any way to do that, sorry to say. The Package report doesn’t list hyperlinks, just linked files … stuff that’s important to printing the job.
The only suggestion is to use the “old faithful” method. If all your links have “http” in them, for example, do a document-wide Find/Change, finding http and replacing with http (so nothing is actually changed). When you click Change All, ID will tell you how many changes there were. Or if you used a hyperlink character style, you could Find/Change on that format, clicking Change All to get the count.
Ah… that’s a clever workaround, Anne-Marie.
Thanks.
Snagit will capture and save editable text on a widows machine. I’ve not found an equal on the Mac side. I use it to get lists of my book files.
I wrote this post in 2009, but now I would likely just do what Andy suggests. Snag-It for the Mac can do the same. So cool! You take a screen shot, it opens in the Snag-It editor, you right-click and choose Save Text, it puts the text in your clipboard and you paste it where ever. So great.
This is a great tip.
On another subject – I posted a question here last week, and I have no idea where or how to find out if it was answered. Can anyone help me with that? (please don’t laugh at me).
Thanks!
@Ginni: Sorry, but I don’t see any previous comment/question. Perhaps it didn’t go through. Or perhaps you posted it on another site? (No laughing! Trying to help.)
No laughing … you didn’t laugh at me (you didn’t, right?)
I did post it here – I swear.
Ginni, I just did a search of our database. Before the posts on this thread, your most recent post was from back in June:
https://creativepro.com/indesignsecrets-videocast-4-table-feature-enhancements.php/comment-page-1#comment-476240
So … maybe you wrote a comment and forgot to click Submit? I’ve done that.
Why don’t you wait until our forum opens (later today) and post your question there? It’d be the perfect place. When it’s live, you’ll see a “Forum” link in the grey navigation bar at the top, to the right of the Videocast link.
AM
All these scripts seem to choke on any graphics placed inside a table. Are there any solutions to dealing with that?
Thank you
Awesome tip – saved me hours!
Thank you! This is superb.
I just stumbled on this script. What a time-saver!!
I too have just found this and it is going to save me a ton of time on my current job.
Big thanks for the link.
hi ,
if I want have a list of the graphic links mid page numbers , what do write script ?
Right click on selected links in the link pane (use shift to select many links) . Then right-click and choose Copy Info – Copy Info for Selected Links.
Thanks Mehmet (and others). Th copy info should be super obvious, but it wasn’t to me, and I’ve used InDesign for a very long time. But the copy paste really does work. If you need all links in a doc, just select them all, then copy. I pasted into a spreadsheet, and it works great – separate columns and everything, which makes it sortable, and really useful. For example, when we publish our magazine, we can create that list, sort it by the path name of the folder from which all the ads are linked, and export a list of ads with the page number on which the ads appeared – which makes the people doing tearsheets and invoicing really happy.
Mehmet- Great Tip – it was there all along! Thanks!
if you just want a list of images you can select them in the link panel > right click > copy info & choose what info you want selected
// JavaScript Extension to put (e.g. listLinks.jsx) into the “Scripts Panel” Folder
// Writes a plain text file containing the links of xyz.indd named xyz-links.txt into the folder containing the indd
// Tested in CS6
var linkListe;
linkListe = app.activeDocument.links.everyItem().name.join(“\r”);
var myFileName;
myFileName = app.activeDocument.fullName + “”;
if(myFileName.indexOf(“.indd”)!=-1){
var myRegularExpression = /.indd/gi
myFileName = myFileName.replace(myRegularExpression, “-links.txt”);
}
else {
myFileName = MyFileName + “-links.txt”;
}
var textFile = File(myFileName);
textFile = new File(FileName);
textFile.open(“w”);
textFile.write(linkListe);
textFile.close();
I encounter an error while running this script, though I’m not a script writer, I tried to change the
textFile = new File(FileName);
totextFile = new File(myFileName);
The script is working fine now.
I also noticed if an image is used multiple times in a Document, the image name is listed multiple times in the .txt file.
Yes, its working perfectly but want to ignore all master page images.
Is there any suggestion??
Thanks amit
hi,
thank you for this script, i find it very useful. would it be posssible to include metadata of linked pictures in this list? thank you
Is this Great, Would it be possible to get the page number also?
Thanks,
AMAZING, what a find!
Much easier. Just (on Windows) highlight all Files / Links and then click right > Copy Info > Copy Info for Selected Links
Next Step: open Text, Word, whatever and paste the info (strg + V).
Voila.
Is there a way to export a pdf with all the link (art Names) on the page?
Sure, use https://www.rorohiko.com/wordpress/indesign-downloads/framereporter/ … one of the options is to show the image filenames on each image. I *think* they can be printed/exported to PDF as well.
Thank you, I will downloading ASAP!
This was just what I needed, thank you!!
Hey,
What you can also do is:
1. Go to links panel
2. Click in panel options(Links Panel Menu)
and show column of Path
3. Copy Info (Links Panel Menu)
4. Ctrl + V in Excel
Best,
A
Great script thanks. Is there a way of adding the page number on which the image appears?
Thanks
Hi Anne-Marie,
First off, many thanks for all the wonderful hints you and David have provided me with over the years. Secondly, working my way down these comments and cherry-picking what I felt might be most appropriate for someone like me (i.e., Windows and excluding anything that required a 3rd party ‘script’ and any advice that looked like it could involve more than 4 simple steps) and I was able to get exactly what I wanted It has worked just great notwithstanding that it took a fair bit of trolling through various and sundry comments, opinions and replies. Basically, 1. Go to Linked Panel Options and include ‘Path’ (or whatever you are interested in tracking). 2. Copy all. 3. Paste…’et voila’ as the French would say. In-between all the other things you have going on might it be worth updating your original article. With very kind regards to yourself and David. Ken
Great tip. It worked! Thank you so much for sharing.
Hi ,
Thanks for this script,
Can you please advise how we can loop through a folder and get the list of all links and save it in a text doc in my desktop.
Thanks in advance