Jump to content

Export a File to the Desktop


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

Recommended Posts

Hello all,

I'm trying to put together an Export script that saves a file to your desktop. I need it to work for both a PC and a MAC. The operation needs to be seamless in that both the PC and MAC users have same script with the same filename on both OS's.

On a PC you can define the file path as C:Documents and SettingsAll UsersDesktop it should show up for every user for that PC on thier desktop. However this will only work if they have write permissions to that folder.

Since I'm not very good with Macs I have no clue what the relative path would be for the current users desktop.

Can anyone help me with the what are the correct file path references for the current user's desktop on both a PC and a Mac?


Link to comment
Share on other sites

There are 3 parts to this operation. Each of which is in the Help, and clearly explained, if you can find it. Start with Lee's search. The Creating file paths line is good.

But it's kind of hard to find all 3 pieces together. The first you need to understand the FileMaker file paths. The other 2 pieces are the new function, Get (DesktopPath), and the new script step Set Variable (which has a "calculation" option). Putting all 3 together you get (the variable name is user-entered). A pseudo example:

Set Variable [ $DT_file ;

Case ( Get ( SystemPlatform ) = -1; "filemac:", "filewin:") &

Get ( DesktopPath ) & "Folder path/File name" & ".txt"

Use $DT_file in the File path box in the Export dialog's Specify output file, just as it is, no quotes. Folder path and File name are text in the above, but they could also be fields. The usual rules apply about quotes, as this is a FileMaker calculation.

Link to comment
Share on other sites

Wow!! It works. Thanks Fenton for the reply. I'm sure if I dropped enough time into the manual I would have found it. I wasn't even thinking of using a varaible and the get functions.

Link to comment
Share on other sites

This topic is 5686 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.