1 Reply Latest reply on Sep 13, 2011 8:56 AM by philmodjunk

    Batch Image Export



      Batch Image Export



      After a discussion with FM tech support yesterday I realized the script provided for exporting images only exports the images for a single record at a time. Tech Support suggested contacting a FM Pro consultant for modifying the script. I have about 10,000 records with up to 5 associated images for each record. Does anyone have a script to export all (50,000) images at a single time, or a price estimate for what it would cost to have a consultant develop such a script?

      Many Thanks,

      Mary Byrne 

        • 1. Re: Batch Image Export

          Do you know how to create scripts at all yourself?

          The basic script wouldn't be that complex, but it's not something you can just import into your file and use it. Either you or that consultant would have to take the actual file and modify it by adding a script to it.

          Here's a general outline of a script that exports all images from all records in a given table in Filemaker to a folder named "images" on your desktop:

          Show All Records
          Go To Record/Request/Page [first]
             Set Variable [$Path ; value: "File:" & Get ( DesktopPath ) & "/Images/" & YourTable::imageNameField & ".jpg" ]
             Export Field Contents [$YourTable::YourField ; $Path ]
             Go To Record/Request/Page [next ; exit after last]
          End Loop

          This only exports one image file per record, but to export additional fields from the same record simply requires adding additional pairs of Set variable and export field contents steps for each additional field. (Each needs a unique file name so each needs it's own $Path type variable here.)