3 Replies Latest reply: Apr 10, 2012 1:50 PM by Muppet Mark RSS

    Relative file path/folder (AppleScript)

    macbeth07 Community Member

      How do I set a folder as a realtive path to where the script is running??  

      is there any easy way like in unix, starting without / ?

      or for example

       

      "~/Desktop/"

       

      "/users/<login>/desktop/"

       

      seems that path to me is the only way...

       

      is there an easy way to change posix paths to applescript??

       

      I have this code:

       

      tell application "Finder" to set templateFile to (container of (path to me) as string) & "Graficas FINAL ADQAT.ai"

       

      with this error:

      error "No se ha encontrado el archivo Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai." number -43 from "Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai"

       

      the file is there how I change the filepath to be compatible with applescript??