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.

Filemaker and OSX ftp

Featured Replies

Hello all,

i am trying to build a small database which enables the user to up or download pictures he stored inside of a container field to a specified ftp server directory. while i know there is a nice plugin which can probably do that, i hope i can make use of OSx internal ftp command, connected with applescript. Can anyone maybe give me a headstart on how to accomplish this?

thanks a lot,

overrider

You can upload a file using either "ftp" or "curl" with ftp. I've used the latter. The main problem is figuring the entire path to the folder/file you want to end up. You can use AppleScript and the 'do shell script' command, in a FileMaker Perform AppleScript step. The AppleScript looks like this (all 1 line):

do shell script "curl -T " & (quoted form of POSIX path of "path:to:image.gif") & " " & "ftp://user:[email protected]/path/image.gif"

The (quoted form of POSIX path of "path:to:image.gif") is just a syntax conversion from the old Mac path style (:) to the new Unix file path syntax (/). The "quoted form of" takes care of spaces, etc.. You can just use a Unix style path instead.

do shell script "curl -T 'Users/fej/Desktop/file.ext' 'ftp://user:[email protected]/path/image.gif'"

I put single quotes to do the quoted part, as do shell script requires the double quotes. Alternatively, since you're in AppleScript, you can set the paths into variables, then just use those in the command; it's more lines, but less messy in a way.

set fileToFTP to quoted form of (POSIX path of (choose file)) -- a Mac path converted to Unix path

set fileFTP to quoted form of "ftp://user:[email protected]/path/image.gif"

do shell script "curl -T " & fileToFTP & " " & fileFTP

(space after the -T, space between the 2 file path AppleScript variables)

The 2 file paths can come from FileMaker fields, ie.:

set fileToFTP to cell "fileToFTP"

set fileFTP to cell "fileFTP"

You might want to still do the quoted bit, if you have spaces in the paths, ie.;

set fileToFTP to quoted form of fileToFTP

I've had problems trying to do it all in one step. FileMaker doesn't seem to like (maybe more () would help?):

set fileToFTP to quoted form of cell "fileToFTP"

If you can get the complete path of a file on your server then you can reproduce it.

Edited by Guest
quoted form of (good night)

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.