The below bash script can used if you need to FTP an export from FileMaker Server to anywhere. Â The script basically looks to see what ever document is in the Documents folder of FileMaker Server and passes that to the cURL command. Â It then moves the file to clear it out the directory. Â You can /should include error trapping and maybe setup subdirectories but my objetive is to keep this simple to convey the concept after which you can “go nuts” customizing it.
#!/bin/bash cd /Volumes/Server\ HD/Library/FileMaker\ Server/Data/Documents/ LOCALFILE=$(ls) curl -T /Volumes/Server\ HD/Library/FileMaker\ Server/Data/Documents/"$LOCALFILE" ftp://22.214.171.124/destinationdirectory/ --user username:password mv "$LOCALFILE" /Volumes/Drivename/uploads/