Read/Write Question
Read/Write Question
- Subject: Read/Write Question
- From: Simon Topliss <email@hidden>
- Date: Fri, 29 Jun 2001 14:42:42 +0100
I have a disk full of Adobe Illustrator files sent to us by a customer
(12GB). Because the files were previously stored on a different disk with a
different name all the paths for images used by the files are no longer
valid. So every time a mac artist opens the file it asks for the location of
every image placed (eps, tif, etc).
I would like to fix the paths using AppleScript. This (I think) will involve
using the read/write commands to open each file, search the file for a
placed image and update the path to the image's new position.
So, my questions are as follows:
1. The files are large - 1MB to over 40MB. How should I read the files? Will
it possible to read the file into a variable in one go? Or should I read it
in chunks?
2. How should I do the search and replace? With AppleScript's text item
delimiters? Or a search and replace handler? An example would be "Customer
Disk:Logos:Logo.eps" to be replaced with "Work Volume:Customer
Folder:Logos:Logo.eps".
3. Is FindFile osax the fastest way to search for the image's new location?
Thanks for any input.
Simon