Jump to content

path to desktop

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

Recommended Posts

Hi I want to export a file in scriptmaker. Is it possible to send it to the users desktop rather than a specific place.

I tried


but that didnt seem to work. Thanks

Link to comment
Share on other sites

You cannot do a FileMaker export to the user's desktop, because each user desktop is unique, and unfortunately FileMaker doesn't recognize the "~" syntax, which is Unix.

It can export to another known folder. One that everyone should have, unless they've renamed their hard drive, is:

Macintosh HD/Users/Shared/

Add a "filemac:/" prefix, and append a fixed file name for a full FileMaker export path, Export, then move the file to the desktop with AppleScript (which also knows the path to the user's desktop).

tell application "FileMaker Developer"

-- comment out or remove this line the last "end tell" if in a Perform AppleScript step

-- FileMaker Export path: filemac:/Macintosh HD/Users/Shared/Export.pdf

set sharedFolder to (path to "sdat") as string

set sharedFile to sharedFolder & "Export.pdf"

-- AppleScript path: Macintosh HD:Users:Shared:Export.pdf

tell current record of window 1

set fileName to cell "FileName"

end tell

set newFile to sharedFolder & fileName

tell application "Finder"


set name of file sharedFile to fileName

set movedFile to move file newFile to the desktop with replacing

-- with replacing overwrites this file if it exists

open movedFile

-- optionally open the file

end try

end tell

end tell

Link to comment
Share on other sites

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