• 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
Make Symlink in AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Make Symlink in AppleScript
      • From: Clark Martin via AppleScript-Users <email@hidden>
    • Re: Make Symlink in AppleScript
      • From: Yvan KOENIG via AppleScript-Users <email@hidden>
  • Next by Date: Re: Make Symlink in AppleScript
  • Next by thread: Re: Make Symlink in AppleScript
  • Index(es):
    • Date
    • Thread