How to create a symbolic link with Quicksilver

quicksilver

Quicksilver has a "Make Alias in…" action but this creates a hard link. Is there any way, including plugins, to create a symbolic link?

Best Answer

Best is to use an automator (service) you can call with QuickSilver…

The service receives "files or folder" in "Finder.app" You then add a "Run AppleScript" action with the following code (that you might want to tweak a little) :

    on run {input, parameters}

    tell application "Finder"
        repeat with i in input
            if class of i is not folder then
                set p to POSIX path of ((container of i) as text)
            else
                set p to POSIX path of (i as text)
            end if
            if p is equal to "/" OR p is equal to "/Volumes/" then
                set p to POSIX path of (path to desktop folder) & (name of i as text)
            else
                set p to (p & (name of i as text) & "_SymLink")
            end if
            set i to POSIX path of (i as text)
-- to debug :
--          display dialog "ln -s '" & i & "' '" & p & "'"
            do shell script "ln -s '" & i & "' '" & p & "'"
        end repeat
    end tell

    return true
end run