Livvy Jeffs
Livvy Jeffs

Reputation: 159

How to Set File Path in AppleScript?

I cannot figure out or find examples for how to set a file path, in terms of the appropriate formatting.

    -- set up the attachment folder path
    tell application "Finder"
        **set folderName to "License Agreements" as text**
        **set homePath to "~/Desktop/Uber Drive/UOT - EchoSign" as text**
        set attachmentsFolder to (homePath & folderName) as text
    end tell

I want set the path to ~/Desktop/Uber Drive/UOT - EchoSign but am really struggling to find any examples, and I've spent quite a while shooting around in the dark. Any help?

Upvotes: 0

Views: 2834

Answers (1)

adayzdone
adayzdone

Reputation: 11238

Stop shooting in the dark...

-- You don't need a "Finder" block
set folderName to "License Agreements"
set homePath to POSIX path of (path to desktop as text) & "Uber Drive/UOT - EchoSign"
set attachmentsFolder to homePath & "/" & folderName

Upvotes: 1

Related Questions