title: How do I create a Macintosh Finder Alias From the Command Line?
body: <p>I am trying to create a Finder Alias from the command line or from a Python program. I have searched the web[1][2][3] and found this bit of applescript:</p>
  
  <pre><code>$ osascript -e 'tell application "Finder" to make new alias at POSIX file "/Users/vy32/cyber.txt" to POSIX file "/Users/vy32/a/deeper/directory/cyber.txt"'
  </code></pre>
  
  <p>Unfortunately, it gives me this error:</p>
  
  <pre><code>29:133: execution error: Finder got an error: AppleEvent handler failed. (-10000)
  </code></pre>
  
  <p>[1] <a href="http://hayne.net/MacDev/Bash/make_alias">http://hayne.net/MacDev/Bash/make_alias</a></p>
  
  <p>[2] <a href="https://discussions.apple.com/thread/1041148?start=0&amp;tstart=0">https://discussions.apple.com/thread/1041148?start=0&amp;tstart=0</a></p>
  
  <p>[3] <a href="http://hintsforums.macworld.com/showthread.php?t=27642">http://hintsforums.macworld.com/showthread.php?t=27642</a></p>
  
  <p>What am I doing wrong?</p>