FileMaker 17 introduces a useful new feature called “Create Directories” when creating files.
This works with saving a copy or clone of the database, as well as exporting PDFs or text files.
I decided this was a good time to update my old Backup database script.
I use this script when developing locally.
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.
This script could also be useful when developing for people who are using the database in a stand alone environment (ie. not on FileMaker Server), running it with FileMaker Pro client.
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.
The only thing that took a bit of work was figuring out where iCloud Drive stores it’s files.
See below for the solution.