Highlighted

Finding graphics folder for a book

Community Beginner ,
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!

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

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.

TOPICS
Scripting

Views

89

Likes

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

Finding graphics folder for a book

Community Beginner ,
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!

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

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.

TOPICS
Scripting

Views

90

Likes

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
May 22, 2019 0
Adobe Community Professional ,
May 22, 2019

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
May 22, 2019 0