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 thru Filemaker

Featured Replies

hello,

i have a DB in which each record is referenced to a sound file on a hard drive ,i can play the sound via quicktime using an applescript .What i would like to be able to do is COPY the soundfiles (that are referenced from the records in a found set) to another location.

any ideas any one

Paul Apted

While I do not know the exact commands, but Applescript can accomplish this. You could also use Troi File plugin to do file manipulation from within Filemaker without needing Applescript.

Here is a sample script that will work if you are storing your sound files as file references...

tell application "FileMaker Pro"

set theFile to cell "container" of current record

end tell

if theFile is not "" then

try

set thePath to theFile as string

on error

display dialog "Container data is not stored as reference to file"

return

end try

set theDestinationFolder to choose folder

tell application "Finder"

duplicate file thePath to theDestinationFolder

end tell

else

display dialog "No file found in current container field"

end if

  • Author

thanks for the script,

however,when i run the script i get the following error:

"Findergot an error:Can't set alias (my chosen destination) to file (my field with the text of the file path in this case smile.gif"sfx:fx:hit:hit01:hit-01/34. (error -10006)...

any ideas?

thanks for your help

Paul Apted

ps i am running FM 5.5 on OSX 10.1.5 with the files on a firewire drive known as SFX

I sorry I haven't been quick to reply.

The script needed minor modification to work for OS X...

tell application "FileMaker Pro"

set theFile to cell "container" of current record

end tell

if theFile is not "" then

try

set thePath to theFile as string

if thePath = "" then

display dialog "No file found in current container field"

return

end if

on error

display dialog "Container data is not stored as reference to file"

return

end try

set theDestinationFolder to choose folder

set theAlias to alias thePath

tell application "Finder"

duplicate theAlias to theDestinationFolder with replacing

end tell

else

display dialog "Could not copy file"

end if

[OS X does not appear to handle the error capture as well as OS 9]

  • 3 weeks later...
  • Author

So it goes on...

Thank you for the new script ,unfortunately now i get a -43 error (File sfx:fx:ct:ct 03:ct-03/28 wasn't found) i pasted your script as was just changing '"container field" to the field "filepathtext" which contains the filepath ,i am trying to think what else i could do to make it work but have no idea ,

thank you for your help anyway ,if you have any bright ideas...

Paul Apted

Explain to me your situation so I understand a bit more clearly. You have the file path in a text field or you have a container field?

  • Author

yes,

each record has a text field called "Filetextpath" . i have a script that copy's this field into a global field and then plays the sound via quicktime. this works fine so i know the file path works ,

if there is any more info you need let me know

thank you

Paul Apted

  • 3 weeks later...

This is a simple problem and I have hopelessly complicated it. Try ...

tell application "FileMaker Pro"

set thePath to cell "filepathtext" of current record

end tell

if thePath is not "" then

set theDestinationFolder to choose folder

try

set theAlias to alias thePath

tell application "Finder"

duplicate theAlias to theDestinationFolder with replacing

end tell

on error errMes

display dialog "Could not copy file" & return & errMes

end try

else

display dialog "Blank String"

end if

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.