Created
May 22, 2016 13:27
-
-
Save brake/bdb54b0e62364857807b14df0d24c895 to your computer and use it in GitHub Desktop.
Create symlink for file selected in Finder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run | |
open {choose file with prompt "Choose a file to create a symbolic link:" without invisibles} | |
end run | |
on open the_files | |
repeat with i from 1 to (count the_files) | |
try | |
set posix_path to POSIX path of (item i of the_files) | |
if posix_path ends with "/" then set posix_path to text 1 thru -2 of posix_path | |
do shell script "ln -s " & quoted form of posix_path & " " & quoted form of (posix_path & ".sym") | |
end try | |
end repeat | |
end open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment