Re: Make Symlink in AppleScript
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