This has changed with FileMaker Pro Advanced 17, allowing much-improved organization of scripted exports. Now, when you specify the path, exporting script-steps will create a new directory if it doesn’t already exist. You can even create nested directories.
As with previous versions, you cannot export a file to a location that the user does not have permission to modify–for example, the root level of the user’s hard drive. As would be expected, you also can’t make a new directory in locations where the user doesn’t have permission.
One of the great strengths of FileMaker is its ability to export data to a user’s computer in a variety of formats. With FileMaker 16 and earlier, a developer had limited choices as to where the export files would be saved. One could set a variable with the user’s Desktop path, or the path to the temporary folder, or hard code in an expected path. With all of these options, the directory (i.e., folder) had to already exist. One could not create a new directory as part of the scripted export.
URL https://luminfire.com/2018/05/15/create-directories-via-script-step-filemaker-17/