
If the folder doesn’t exist, you don’t get an error message, FileMaker just creates the directory. This is the new FM 17 features called Create Directories. NEW to FM 17: Turn ‘Create Directories’ ‘On’ The only odd case is iCloud Drive which uses an unusual path. I am using the Get DesktopPath function to get a basic path statement and then swapping out the word “Desktop” for “Documents”, or “Google Drive” etc. Substitute ( Get(DesktopPath) “Desktop” Globals::Backup Location )) If ( Globals::Backup Location= “iCloud” Substitute ( Get(DesktopPath) “Desktop” “Library/Mobile Documents/com~apple~CloudDocs” ) This routine pads the date and time numbers with zeros to the left. Finally the file gets saved to the defined folder. Then a Custom Dialog box comes up offering the user the option of saving now. It basically sets the file name, the directory and the folder name to build a path for the file. Your mileage may vary, please test first. Any service that gives you a local folder to sync to, could work. You could add others to the list, such as Box etc. In addition to local storage (Desktop and Documents), I have tested this on both iCloud and Google Drive. See below for the solution.ĭownload: FileMaker 17 Backup Database Demo HB-Backup Database 17 The only thing that took a bit of work was figuring out where iCloud Drive stores it’s files. Because you don’t know much about the client’s environment, such as where they want to backup to or the folder they want to backup to, it is useful to have a general purpose script like this. not on FileMaker Server), running it with FileMaker Pro client.

This script could also be useful when developing for people who are using the database in a stand alone environment (ie. If I am about to make a major change to a layout etc, I can invoke this to give me a date and timestamped version of the database. I use this script when developing locally. I decided this was a good time to update my old Backup database script. This works with saving a copy or clone of the database, as well as exporting PDFs or text files. FileMaker 17 introduces a useful new feature called “Create Directories” when creating files.
