And what value are you assigning to the $FilePath variable?
Depending on the value assigned to that variable, it is quite possible for the file path assigned to that variable to be valid when the database is in one location and invalid when it is moved to another location.
Now I show my ignorance. I do not know what assigning a value to $FilePath means, having copied the script from elsewhere. But here is a strange thing. I have moved the database around and there is no longer a problem. So it was not the movement alone, the appearance of this error message appears arbitrary.
Another arbitrary occurrence with FM13 on my Mac running Yosemite is this: the ⌘+L as a shortcut to Layout view is occasionally disabled but sometimes works fine. Is there a bug in the application?
$FilePath is a variable and you would have to give it a value and in this cause it would be the path . You need to set this path to the correct location. Yes, there is a known bug of shortcut disappearing. I believe this bug has mainly showed up on macs using Mavericks or Yosemite.
Thank you PhilModJunk and S Chambles. Thank you PhilModJunk for the link, I will study this at length and in depth, looks v promising. For now, let me say what I tried. I moved the database into the preferred folder, edited the script by removing the file path from the specified output field and re-entering it. So it looked the same:
But written from a different location, it seems to work. I would love to know the science behind it, because I presume this has widespread implications.
Somewhere in your script, there is most likely a set variable script step that assigns a value to $filePath. The calculation inside that script step is the most likely culprit causing your error message. Without such a script step, there's no value assigned to $FilePath and you do not have a valid file path.
It's also possible for a calculation to use the Let function to assign the value to your variable and that could make it hard to find where your path variable gets its value, but that seems a very unlikely way to create this script.
I wanted to say Thank You for the amazing explanation. Took me a few tries to get the syntax right but it finally works. I do not know what I would do with out your helpful and patient suggestions.