Copy link to clipboard
Copied
I usually store all my pictures in one folder locally and import them in the fm files I am developing. Is there any easy way to filter out the pictures that are not used in the book?
See: http://blogs.adobe.com/techcomm/2011/07/create-a-book-packager-using-extendscript.html
This is supposed to copy all the used graphics to ./insets/ and update the references. Then you could delete the entire original imports subdirectory.
I've never run anything higher than FM9, and so have no experience with it. Other forum users may have some tips. Based on the chatter on that blog article, there may be some issues.
We're on FM7.1/Unix for production, and use our own local csh&sed Unix script
...Copy link to clipboard
Copied
What version of FM?
If it's 11 or 12, there may be an Archive hack you can use to essentially un-archive the unneeded imports.
If you want to write a script to process MIFs, grep for:
grep ImportObFile *.mif
grep TiSrcFile *.mif
The results can then be parsed to create a list of used imports, and perhaps move them. Delete what's left.
For a small number of imports, it's probably easier to move everything to a subdirectory, open the document, then move back each file as FM complains about it. Then delete the subdir.
Copy link to clipboard
Copied
Thank you. Yes, FM 11. So does that means I can use your write-a-script way? Can you give any detailed instruction, for example step 1, step 2...? I have no idea about the script thing.
Copy link to clipboard
Copied
See: http://blogs.adobe.com/techcomm/2011/07/create-a-book-packager-using-extendscript.html
This is supposed to copy all the used graphics to ./insets/ and update the references. Then you could delete the entire original imports subdirectory.
I've never run anything higher than FM9, and so have no experience with it. Other forum users may have some tips. Based on the chatter on that blog article, there may be some issues.
We're on FM7.1/Unix for production, and use our own local csh&sed Unix scripts to perform the same function.
Copy link to clipboard
Copied
For more information on the available Archive utilities and scripts, see this thread and follow the additional links in the messages:
Copy link to clipboard
Copied
Sorry, forgot to ask first, does your archive-hack way the same with the write-a-script way?
Copy link to clipboard
Copied
Handled something very similar recently with help from a colleague, a spreadsheet and a DOS box – compared a list of referenced graphics (thanks to FM) with a list of all graphics in the directory (thanks to the Copy as path) and created a discard.bat from the results :-}
A reliable and re-usable script would have been far more elegant, but as someone whose only programming experience is Pick DataBasic plus a bit a ColdFusion I'm not sure about the ROI for me :-}
Copy link to clipboard
Copied
The following script is useful from some helper above.
Create a Book Packager using Extendscript « TechComm Central by Adobe