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

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

Recommended Posts

Posted

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?

Thanks!!

Posted

With FileMaker open, open the online help and search for Defining file references

HTH

Lee

Posted

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.

Posted

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.

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