0

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?

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

3 Comments

Thank you so much! Will try this when I get back to the office, hope it works. Happy New Years @adayzdone!
Thanks adayzdone! Your answer is correct, although it still does not work due to a Mail Applescript error in Maverick and Yosemite (markosx.com/thecocoaquest/…) :(
The reason it is not working is because you need to save attachments in your downloads folder. Then move them wherever you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.