Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5999 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I wrote a script that's supposed to export data as an Excel file and save it to a user's desktop. On any Mac I've tried, it works, but on any Windows machine, I get the error "filename.xls could not be created on this disk."

I've worked around the error for a while now without finding a solution, and now while looking at the FileMaker Developer Reference (Que Publishing), I see that the result of this function is often cached on the server (along with several other Get functions) in multiuser settings. Is that what's causing my problem?

Posted

Probably not. The cache thing is all about FM Server making the assumption that, once logged-in, a user probably won't change their desktop path (a reasonable assumption IMHO since it would involve renaming system folders etc).

What exactly is the calculation you're using? Even though it's a windows path, it still needs to be in FMP-syntax which is more Mac-like, especially with regard to slashes.

Posted

Attached is a screenshot of Data Viewer while the script is running. It's that leading slash before the C:, isn't it? I don't use Windows much, so I assumed it started with a slash for a reason.

dv.jpg

Posted

Yep, that did it. I added a check for "Get (SystemPlatform)" to add "filemac:" or "filewin:" at the beginning of the $filename variable.

I kind of thought the purpose of the Get (DesktopPath) and other get path functions was to not have to worry about such things, but oh, well.

This topic is 5999 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.