I have several thousand EPS files that don't include embedded thumbnails. I've found that if I open each file in Adobe Illustrator and save the file, the thumbnail is added to the EPS file.
I'd like to add these thumbnails to the files so I figured I could use AppleScript to to the job.
I put the following script together from from google research:
tell application "Finder"
set folderSource to choose folder with prompt "Choose files for saving in mac compactable."
set fileList to every file of folder folderSource as alias list
set folderDest to choose folder with prompt "Choose folder destination."
set destPath to folderDest as string
set fileCount to count folder folderSource
repeat with aFile in fileList
set fileName to name of aFile
set newFilePath to destPath & fileName
tell application "Adobe Illustrator 10"
activate
open aFile
save current document in file newFilePath as eps with options {class:EPS save options, preview:color Macintosh, embed linked files:true, include document thumbnails:true, embed all fonts:true, CMYK PostScript:true, PostScript:level 2} with replacing
close current document saving no
end tell
end repeat
end tell
The problem I've encountered occurs on the line:
tell application "Adobe Illustrator 10"
When I try to "Run" the script I get a syntax error on this line to wit:
File some object wasn't found
I've tried several variations of the line but the error persists. Is Finder unable to locate Illustrator or what?
Gary
