• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Make Symlink in AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make Symlink in AppleScript


  • Subject: Re: Make Symlink in AppleScript
  • From: Clark Martin via AppleScript-Users <email@hidden>
  • Date: Sat, 2 May 2020 14:10:54 -0700

Not a solution but a way to figure it out…

change the script to set a variable to the entire shell command line (i.e. “ln
-s from to”).  Then instead of executing it, log it (“log theVariable”), look
at the log to see if there is something obviously wrong with it.  If you can’t
see a problem, copy it and paste it into a terminal window and see what happens
there.

Clark Martin
A designated driver on the information Super Highway

> On May 2, 2020, at 12:39 PM, iKel via AppleScript-Users
> <email@hidden> wrote:
>
> Hello!
>       I may be well over my head here as I’m learning AppleScript but I am
> trying to make a script where I can make a symlink. My code is below, any
> help is much appreciated!
> on run
>       set destPath to POSIX path of (choose folder with prompt ¬
>               "choose a folder for the destination of the symbolic link:"
> default location (path to home folder) without invisibles)
> end run
>
> on open destPath
>       repeat with thisFolder in run
>               set thisFolder to POSIX path of (thisFolder as alias)
>               try
>                       do shell script "ln -s " & quoted form of thisFolder & ¬
>                               space & quoted form of destPath
>               end try
>       end repeat
> end open
>
> I appreciate it in advance!
>
> Live your life as an exclamation rather than an explanation. -Sir Isaac
> Newton

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Make Symlink in AppleScript (From: iKel via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Make Symlink in AppleScript
  • Next by Date: Re: InDesign; using objects from CC Libraries?
  • Previous by thread: Re: Make Symlink in AppleScript
  • Next by thread: Make Symlink in AppleScript
  • Index(es):
    • Date
    • Thread