Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7038 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a large database. I do my editing in the database and then upload the products along with their images to the website. Everything is working fine but Batch exporting all of the images (1 image per record) takes forever because it asks me for a filename/location with each image.

Is there a way to just "suck" all of the images from the database and automatically keep them with the same name without having to hit enter every 3 seconds.

Posted

According to Troi Automatisering, "FileMaker has the limitation that in a script it can only export to a fixed file, or ask the user for a file name. You can not specify the file by a calculation in a script. The same limitations apply when importing records or images."

I use their File Plug-in to handle batch file exports and it works fine.

Posted

On a Mac we have AppleScript, which can do the same thing as Troi File. You would have know where you exported the fixed file to, as a full Mac path, ie., "Macintosh HD:Users:Shared:Images:ExportFile.jpg" (that would be a folder "Images" in the "Shared" folder in the "Users" folder; which will also work with hosted files on Macs. You could also hard-code your own path, if just on your own machine, non-hosted). This is not the same syntax as the file path FileMaker uses in its Export dialog (but not that hard to translate). Troi doesn't use the FileMaker syntax either, it uses the operating system's.

In a Perform AppleScript step, on a layout where both the FileName (with extension) field and the FixedFile full path field are:

set FixedFile to cell "ExportPath"

set fileName to cell "FileName" of current record

tell application "Finder"

set name of file fixedFile to newName

end tell

In FileMaker 8 you no longer need a separate tool. You can set the name into a Script Variable. But it would also require the rest of the path (unless you just wanted to export to the same folder as the FileMaker file in a non-hosted situation). For example, to export to the desktop (you'd probably want a folder in there too)???

Set Variable [ $DesktopFile; Case ( Get ( SystemPlatform ) = -1; "filemac:"; "filewin:" ) & Get ( DesktopPath ) & FileName ]

or, for just a relative path:

Set Variable [ $File; "file:" & FileName ]

Then you can use the above variable in the Export File Reference dialog box, as just: $DesktopFile (no quotes)

This topic is 7038 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.