Make Symlink in AppleScript
Make Symlink in AppleScript
- Subject: Make Symlink in AppleScript
- From: iKel via AppleScript-Users <email@hidden>
- Date: Sat, 2 May 2020 14:39:39 -0500
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
iKel
email@hidden
_______________________________________________
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