Created
October 22, 2012 15:14
-
-
Save kikaigyo/3931965 to your computer and use it in GitHub Desktop.
シンボリックリンクを作成するAppleスクリプト。Automataのサービスでつかう。
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 {input, parameters} | |
(* Your script goes here *) | |
tell application "Finder" | |
set theinput to item 1 of input as alias | |
set theInfo to info for theinput | |
set theName to name of theInfo | |
set inpath to "\"" & (POSIX path of ¬ | |
(theinput)) & "\"" | |
choose folder with prompt "Choose Destination Folder" | |
set outpath to "\"" & (POSIX path of ¬ | |
(result)) & theName & "\"" | |
end tell | |
do shell script "ln -s " & inpath & " " & outpath | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment