Bash scripts and drag-and-drop. Can it be done?

Discussion in 'macOS' started by Stu L Tissimus, Jan 25, 2008.

  1. Stu L Tissimus macrumors newbie

    Joined:
    Oct 10, 2007
    #1
    Let's say I have a command that takes a single parameter. For example:

    cp <parameter> ~/Desktop

    (That's not the command, but it's the simplest thing I can think of.) Basically, what I'd like to do is be able to drag a file over an application/script in my dock and let said app/script use the filepath as a parameter to a bash script. Any ideas?
     
  2. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #2
    The best way is going to be wrapping this in an AppleScript Drop-Script. This is relatively easy thing to do.
     

Share This Page