Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get (desktop path) not working on Windows

Featured Replies

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?

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.

  • 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.

dv.jpg

You're probably missing the "filewin:" prefix (see Help > Creating a database > Creating file paths).

  • 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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.