Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Copying files based on an ID in FileMaker

Featured Replies

Hi,

I do have some basic knowledge of AppleScript with FileMaker, but this has me stumped. crazy.gif" border="0

I've got a database made for a friend that has descriptions of hundreds of old advertisements. Each record has a unique ID.

These Ads have been scanned and saved with the same name as the ID (though with a .jpg extension at the end of the file name). They are all saved on an external hard disk in a common folder called "Press Ads".

Problem is that he needs to mail these out to people regularly, and finding them is painful.

Is there anyway through AppleScript that I can copy them to a new folder ?

Thanks in advance

Partha Dasgupta

In the database, create 2 new fields (global - text format):

1. "from_folder" who contains the path to the folder named "Press Ads"

a path looks like this : "HD_name:folder:sub_folder:Press Ads:"

2. "to_folder" who contains the path to the new folder

Then try this applescript :

set the_name to cell "ID" of current record

set the_from_folder to cell "from_folder" of current record

set the_to_folder to cell "to_folder" of current record

set the_file to from_folder & the_name & ".jpg" as string

tell application "Finder"

duplicate (the_file) as alias to (the_to_folder) as alias

end tell

Jean-Marie

  • 3 weeks later...

The script below wil find "Tagged" records and move the corresponding image to a folder.

Or, ditch the doScript line and find your images manually, then run the AppleScript

tell application "FileMaker"

activate

open file "SomeDrive:SomeFolder:SomeDB"

do script "SomeScript ThatFindsTheRecords"

set N to (number of records)

set T to N

repeat N times

set UserImage to cell "SomeField" of record T

set UserPath to "SomeHarddrive:SomeFolder:" & UserImage & ".jpg" as string

set T to (T - 1)

tell application "Finder"

activate

try

move file UserPath to folder "SomeHarddrive:SomeFolder"

on error

display dialog UserImage & " Not Found"

end try

end tell

end repeat

end tell

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.