Script Function: Get(DesktopPath)

Posted in Scripts by Dempsey
.

When you are automating exports of user data from a FileMaker file, the easiest place for the user to be able to find the exported file at a later date is on the desktop.  How can you export a file there?  Using the Get(DesktopPath) script function!

It returns the path to the desktop folder with a trailing slash ready for you to append a filename to, for example:

$file = Get(DesktopPath) & “export.xml”

Would return something like ‘/C:/Documents and Settings/Username/Desktop/export.xml‘ on a Windows machine and something similar to ‘/MacintoshHD/Users/Username/Desktop/export.xml‘ on a Mac.

If you save it to a variable you can then use it in an export path to enable dynamic export paths to the user’s desktop, without having to know their platform and system username.

Leave a Reply