🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #687

Relink book file

#687
From: hm24_arul
Date: Mon, 09 Mar 2009 05:38
26 lines
1437 bytes
Hi scripters

Here I am updating book file.contents from one folder to another folder. Below is my code I used to update the book file. While I am executing this script It's processing for sometime and finally closes the Indesign application.

var new_folder = Folder.selectDialog("Please select a folder");

bb = app.books[0].bookContents;
for (i = 0; i < bb.length; i++) { chname= File(bb[i].fullName).name; mynewfile = File(new_folder + "/" + chname); if (mynewfile.exists) { bb[i].replace (File (mynewfile)); } }

The error shown below

---------------------------
Adobe InDesign
---------------------------
Adobe InDesign is shutting down. A serious error was detected. Please restart InDesign to recover work in any unsaved InDesign documents.
---------------------------
OK
---------------------------

Please advice me where I am mistaken?

thanks in advance

regards
a r u l
vpublish.net
Technical Details
Message-ID: <59b828d0.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d775465f76fdb991,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: hm24_arul@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Relink book file
Message-ID: <59b828d0.-1@webcrossing.la2eafNXanI>
Date: Sun, 8 Mar 2009 22:38:11 -0700
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit