Is there a way to do it?

Discussion in 'macOS' started by Wowzera, Jul 29, 2009.

  1. Wowzera macrumors 6502a

    Joined:
    Oct 14, 2008
    Location:
    Brazil
    #1
    Hello,

    I'm currently trying to do the following:

    Create a script or something else, that I just grab a file into it and it executes the terminal code:

    Code:
    sudo rm "filename"
    So all it prompt me is to type my password.
     
  2. P Mentior macrumors regular

    Joined:
    Sep 20, 2008
    Location:
    Ohio
    #2
    I don't really understand what you are trying to do. Are you looking for something that you drag a file onto and have it ask your password? If so I really don't understand what the point would be.....
     
  3. Wowzera thread starter macrumors 6502a

    Joined:
    Oct 14, 2008
    Location:
    Brazil
    #3
    I simple want a file (automator/applescript) that when I drag a file into its icon will execute that terminal code.
     
  4. GroovyLinuxGuy macrumors regular

    GroovyLinuxGuy

    Joined:
    Apr 2, 2006
    Location:
    Canada
    #4
    Check out DuckBill it's a neat app that will let you gui-ify your shell scripts.

    http://web.me.com/adamsdv/Duckbill/Duckbill.html

    Otherwise I would recommend the Trash Icon! :D


    Dang it...I missed the 'sudo' in your post...might still work for you tho..dunno
     
  5. Wowzera thread starter macrumors 6502a

    Joined:
    Oct 14, 2008
    Location:
    Brazil
    #5
    Thanks, I will give a try :)
     

Share This Page