Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

FTPUpload ( URL ; user ; password ; directory ; file ; localdirectory ; localfile )

Rate this function:  

  Average rating: 4.1  (48 votes)
  Discuss this Custom Function

Alan Deffenderfer, ABD Enterprises

Function to Upload file using curl and applescript

Sample Input:
FTPUpload ( URL ; user ; password ; directory ; file ; localdirectory ; localfile )
Sample Output:
do shell script "curl -T /Users/yourhome/Desktop/yourlocalfile.txt"

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


Use the perform applescript script step with this function to perform ftp uploads. I use globals/variables that reference my paths/filenames and your username/password.

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


5 most recent comments | Show all 10 comments

How to Set globals/variables that reference your paths/filenames and username/password and pass to the function.

"do shell script \"curl -T '" &

Case( not IsEmpty( localdirectory );

localdirectory )

& localfile & "' ftp://" & user & ":" & password & "@" & URL & "/" &

Case( not IsEmpty(directory);

directory & "/")

& file & "\""

Bryan, USA
April 10, 2014 4:04am

It works great. Thanks!

Ingo, Vienna/Austria
April 07, 2015 11:02am

I want to run this script/function scheduled on Filemaker Server. What needs to be done with the local directory for FMS to be able to access the file for upload. I am led to believe that FMS can not access the Desktop of the server for files.

Brian McIntosh, Korora
January 23, 2016 4:13pm

The best way to ensure that type of script using CURL under Applescript or Windows events works as expected is to use the Filemaker function GetAsURLEncoded () encode the inputs, then characters which are illegal in a URL will not stop your Curl command from functioning.

A second useful item when debugging CURL is this form which returns to you what the FTP server received:

curl --trace -n -v -ssl -l ftp://<username>:<password>@<svr IP address>/<folder>/<file.html>

In DeskspaceCMS, we trap for an error on upload and if one occurs we pass the output of this CURL command back to the user in a dialogue so they can work out where they went wrong.

Nick Lightbody: Sussex UK

Nick, Sussex UK
February 25, 2016 11:57am

I wrote this Mac Only custom function over ten year ago and posted almost that long ago. I'm glad some of you have found it helpful.

When I get some time in the coming weeks, I'll update it based on the comments above. Thanks for all the feedback.

Alan @ ABD

Alan Deffenderfer, Baltimore MD
February 25, 2016 4:52pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 5 + 9 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. ChiSquare3x2 ( param ; param ; param ; param )
  (Tue, Aug 14, 6:33am)
2. ReverseByteOrder ( bytes )
  (Thu, Aug 09, 12:06pm)
3. BytesToDec ( hex )
  (Thu, Aug 09, 11:47am)
4. GetAsHexBytes ( number ; bytes )
  (Thu, Aug 09, 10:50am)
5. ValCorrelationCoeff ( XValueList; YValueList; Xmean; Ymean; XStdDev; YStdDev )
  (Wed, Aug 08, 4:17pm)
6. ValLeastSquaresSlope ( XValueList; YValueList; Xmean; Ymean )
  (Wed, Aug 08, 4:10pm)
7. ValueMath ( List1 ; List2 ; operation )
  (Wed, Aug 08, 4:05pm)
8. GetExtension ( File )
  (Tue, Aug 07, 10:22am)

RSS Feed of Custom Functions