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

Finding graphics folder for a book

Community Beginner ,
May 22, 2019 May 22, 2019

Copy link to clipboard

Copied

Hello,

I need to find the folder where the graphic files are stored for a certain book.

For example, the book location is: \pathToBook\myBook.book and imported graphic files reside in the "Images" folder as in: \pathToBook\Images\.

I need to work on legacy books where this folder can be either "Images", "Illustrations", "Resources", "References", "XX", etc.

I'm thinking on parsing each component on the book and look for oGraphic.InsetFile for each imported and look for commonalities.

Do you think this is a good approach?

Is there a way to create an LOR for "Imported Graphics" with code? And, read the path to the file from there...

Thanks in advance!

TOPICS
Scripting

Views

231

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 1 Correct answer

Community Expert , May 22, 2019 May 22, 2019

I would probably loop through all of the files in the book, and check the path on each Inset. You could compile an array of unique paths and then print that array to the Console.

Votes

Translate

Translate
Community Expert ,
May 22, 2019 May 22, 2019

Copy link to clipboard

Copied

LATEST

I would probably loop through all of the files in the book, and check the path on each Inset. You could compile an array of unique paths and then print that array to the Console.

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