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

How to export a list of links from indesign cc 2020

Explorer ,
Mar 17, 2020 Mar 17, 2020

Does anyone know how I can save out/export a text file list of all the links in my inDesign file please?

Cheers.

TOPICS
How to , Import and export , Scripting , Type
14.2K
Translate
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 3 Correct answers

Community Expert , Mar 17, 2020 Mar 17, 2020

Choose File>Package, click Report, then Cancel. The saved text file will list links and link info.

 

Screen Shot 14.png

Translate
Community Expert , Mar 17, 2020 Mar 17, 2020

Select the links in the links panel and the in the flyout menu(accessed by clicking the 3 horizontal lines on the top right of panel), select Copy Info and then Copy Info for selected links. Then you can paste the info in a text file

 

-Manan

Translate
Advisor , Mar 17, 2020 Mar 17, 2020

Hello,

If you're on a Mac check out the link below....

 

https://indesignsecrets.com/create-a-list-of-linked-files.php

 

Regards,

Mike

Translate
Community Expert ,
Mar 17, 2020 Mar 17, 2020

Choose File>Package, click Report, then Cancel. The saved text file will list links and link info.

 

Screen Shot 14.png

Translate
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 ,
Mar 17, 2020 Mar 17, 2020

Good stuff.

Thank you Rob.

Translate
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 ,
Mar 17, 2020 Mar 17, 2020

Select the links in the links panel and the in the flyout menu(accessed by clicking the 3 horizontal lines on the top right of panel), select Copy Info and then Copy Info for selected links. Then you can paste the info in a text file

 

-Manan

Translate
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 ,
Mar 17, 2020 Mar 17, 2020

Nice one!

Both ways work – both have pros and cons.

But this is great help.

 

Thank you.

Translate
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
Advisor ,
Mar 18, 2020 Mar 18, 2020

Hello,

Try the .jsx version for your needs.

 

doc = app.activeDocument;
myDocFolder = app.activeDocument.filePath;
var fileName = doc.name.replace(/.indd/, "");
var linkNames = fileName + '_Links-list.txt';

var file = new File(myDocFolder.fsName + "/" + linkNames);

var myLinkName = new Array();
myLinks = app.activeDocument.links;
for(var i=0; i < myLinks.length; i++){
myLinkName.push(myLinks[i].name);
}

var mylist = myLinkName;
var myNewlist = (String(mylist).replace(/,/g, '\r'));

file.encoding = 'UTF-8';
file.open('w');
file.write(myNewlist);
file.close();
alert('Done creating links list!');

Regards,

Mike

 

Translate
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 19, 2020 May 19, 2020

Hello, could you please make modification of yours script so it would use one report log file for multiple documents.

For example log can be placed at fixed location as root of C (C:\links_log.txt)

Script should make one line name of the file and than list of links followed by separation of few dashes.

 

Is this very complicated to be done?

Translate
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 ,
Mar 19, 2021 Mar 19, 2021

Hi Mike,

    thank you for such a great script!  It works fine.

I need also the page number of the image on the list.

Is that possible ?

Best regards

 

Translate
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
New Here ,
Jun 29, 2023 Jun 29, 2023

This code works great!
Do you know if it's possible to get the entire path? I'm not seeing anything on how to do it in the documentation.

Translate
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
Advisor ,
Jun 29, 2023 Jun 29, 2023

@Tydence! 

 

Give this a try...

doc = app.activeDocument;
myDocFolder = app.activeDocument.filePath;
var fileName = doc.name.replace(/.indd/, "");
var linkNames = fileName + '_Links-list.txt';

var file = new File(myDocFolder.fsName + "/" + linkNames);

var myLinkName = new Array();
myLinks = app.activeDocument.links;
for(var i=0; i < myLinks.length; i++){
myLinkName.push(myLinks[i].filePath);
}

var mylist = myLinkName;
var myNewlist = (String(mylist).replace(/,/g, '\r'));

file.encoding = 'UTF-8';
file.open('w');
file.write(myNewlist);
file.close();
alert('Done creating links list!');

Regards,

Mike

Translate
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
New Here ,
Jun 29, 2023 Jun 29, 2023
LATEST

Yes! That works great! Thanks for the help, I was really stumped on this one!

Translate
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
Advisor ,
Mar 17, 2020 Mar 17, 2020

Hello,

If you're on a Mac check out the link below....

 

https://indesignsecrets.com/create-a-list-of-linked-files.php

 

Regards,

Mike

Translate
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 ,
Mar 18, 2020 Mar 18, 2020

Thank you Mike.

Translate
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 Beginner ,
Aug 05, 2022 Aug 05, 2022

Is it possible to export a list of every link in the order they appear in the document? Or alphabetical? This would be very useful for a back of book catalog. 

Translate
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 ,
Aug 05, 2022 Aug 05, 2022

Hi @eriks3 , You could add a sorting function to @Mike Bro ’s script—this would be alphanumeric:

 

doc = app.activeDocument;
myDocFolder = app.activeDocument.filePath;
var fileName = doc.name.replace(/.indd/, "");
var linkNames = fileName + '_Links-list.txt';

var file = new File(myDocFolder.fsName + "/" + linkNames);

var myLinkName = new Array();
myLinks = app.activeDocument.links;
for(var i=0; i < myLinks.length; i++){
    myLinkName.push(myLinks[i].name);
}
myLinkName.sort(sortAlphaNum);

var mylist = myLinkName;
var myNewlist = (String(mylist).replace(/,/g, '\r'));


file.encoding = 'UTF-8';
file.open('w');
file.write(myNewlist);
file.close();
alert('Done creating links list!');


function sortAlphaNum(a, b) {
    var reA = /[^a-zA-Z]/g;
    var reN = /[^0-9]/g;
    var aA = a.replace(reA, "");
    var bA = b.replace(reA, "");
    if (aA === bA) {
        var aN = parseInt(a.replace(reN, ""), 10);
        var bN = parseInt(b.replace(reN, ""), 10);
        return aN === bN ? 0 : aN > bN ? 1 : -1;
    } else {
        return aA > bA ? 1 : -1;
    }
}
Translate
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 ,
Aug 06, 2022 Aug 06, 2022

This will make CSV (among a few formats). Open in a spreadsheet and sort however you like.

http://www.marspremedia.com/software/indesign/links-report

 

William Campbell
Translate
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