Skip to main content
Known Participant
June 23, 2014
Answered

How to filter out the pictures?

  • June 23, 2014
  • 2 replies
  • 502 views

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?

    This topic has been closed for replies.
    Correct answer Bob_Niland

    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.

    2 replies

    Legend
    June 26, 2014

    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 :-}

    Known Participant
    June 26, 2014

    The following script is useful from some helper above.

    Create a Book Packager using Extendscript « TechComm Central by Adobe

    Bob_Niland
    Community Expert
    Community Expert
    June 23, 2014

    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.

    Known Participant
    June 24, 2014

    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.

    Bob_Niland
    Community Expert
    Bob_NilandCommunity ExpertCorrect answer
    Community Expert
    June 24, 2014

    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.