Search code examples
scriptingapplescriptfinder

"Can’t get alias of" using applescript


I'm making a script where the variable is set to a folder path. I am telling finder to make an alias of the folder, but I'm getting an error.

tell application "Finder"
    make alias of art to desktop
end tell

Error: Can’t get alias of "PATH:TO:FILE"


Solution

  • try this one:

    set originalFIle to (choose file)
    tell application "Finder" to make new alias file to originalFIle at desktop