June 22, 200817 yr 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?
June 23, 200817 yr 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.
June 23, 200817 yr Author 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.
June 23, 200817 yr You're probably missing the "filewin:" prefix (see Help > Creating a database > Creating file paths).
June 23, 200817 yr Author 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.
Create an account or sign in to comment