Newbies chalmejm Posted December 8, 2004 Newbies Posted December 8, 2004 I've been given a DB which contains images that are embedded in container fields. I now want to change this so that the images are referenced instead of embedded, so need to export and then re-import the images. I could go through them one by one, but as there are over 1600 images, I was wondering if there was an easier way i.e. a way to do a batch export of container field contents? Also, I need to publish this DB on the web, so I just want to check if there are any differences between doing this with the images embedded or referenced? Any advice would be appreciated.
transpower Posted December 8, 2004 Posted December 8, 2004 You can write a script to loop through all 1600 images. I've covered before what you have to do: export to the same file each time, then copy that file to another, different file each time (using Send Event).
Newbies chalmejm Posted December 9, 2004 Author Newbies Posted December 9, 2004 Thanks transpower I'm just a beginner with FM though, so haven't written any scripts before. If you've covered this before, could you possibly point me in the direction where I could find out more on how to do this, to save you writing it all out again. Thanks.
Fenton Posted December 9, 2004 Posted December 9, 2004 Since you're on a Mac you can do this probably easiest with AppleScript. Here's an example file. First FileMaker Exports to its own folder. Then the AppleScript moves the file to a Pictures folder, and renames it according the Picture Name field in the FileMaker record. It doesn't have much (any) error checking, but it should work. You need the Pictures folder, or you can edit the script. [P.S. It also is for a stand-alone machine. It's possible to edit the script to work with hosted files. But for what you're doing, 1600 image files, you'd best do it on the host machine, with networking off.] ExportPicture.zip
Newbies chalmejm Posted December 14, 2004 Author Newbies Posted December 14, 2004 Fenton Thank you very much for your help. It took me a while to understand exactly what the scripts were doing, but I think I've got it now. I do have one problem though....when I'm running the script on my database, it's creating the "ExportedFile" file on the desktop instead of in the folder I want the images to go to. Therefore, when the script looks for "ExportedFile" in my folder, in order to move it to the "Pictures" folder, it can't find it....any suggestions?
Newbies chalmejm Posted December 14, 2004 Author Newbies Posted December 14, 2004 Its ok....I just realised that I'd made a mistake in specifying the output file in Export Field Contents. Got it working now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now