Welcome to the iMore Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 2 of 2
  1. Thread AuthorThread Author   #1  
    Massie's Avatar
    iMore Genius

    5,041 Posts
    Global Posts
    5,046 Global Posts

    Default How To: Add a "Permanently Delete" Option to Context Menus to Skip "Move to Trash"

    Anyone who grew up on PCs will be familiar with the old Shift+Delete trick—that combination of keystrokes that immediately and permanently nukes a file. For many, it's a surprise to find that OS X doesn't offer that functionality without cumbersome Terminal commands or third-party apps. Instead, you must first move a file to Trash, and then "empty" the Trash. Only then is a file truly gone—along with everything else in your Trash.

    But what if you only want to delete a particular file at a given time? With Automator, you can add the functionality to your context menus ("right-click" menus) using the Services workflow.

    You can create an Automator service or application to facilitate executing the rm shell commando, which will permanently delete files or folders and skip the trash.

    To begin, start by creating a new Service in the Automator app.

    Select "files or folders" as input; you may also want to limit the availability of this service to the Finder app.

    Optional—but highly recommended to prevent accidental deletion—is the addition of an Ask for Confirmation step to the workflow. Drag it into your workflow from the column at left, then customize the message and the Cancel and OK buttons to your liking.

    Finally, add the Run Shell Script step to the workflow, again dragging from left. Make sure to pass input "as arguments". Then you can put in the following script:

    for f in "$@"
    rm -rf "$f"

    To complete the process with a bit of audio confirmation, add the OS X "emptied trash" sound by including the following command at the end of the shell script:

    afplay "/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/finder/empty trash.aif"

    Save your service, and it should be ready to use in Finder from the Services menu in the menu bar. You can also configure a keyboard shortcut to your service in the Keyboard preference pane of System Preferences.

    Source/Screenshots : mountain lion - How can I skip the Trash when deleting a file? - Ask Different
    Just_Me_D likes this.
  2. #2  

    Default Re: How To: Add a "Permanently Delete" Option to Context Menus to Skip "Move to Trash"

    Thanks, Massie...

Similar Threads

  1. I can't get Twitter to shut up!
    By blessed2bamommie in forum iPad 3
    Replies: 12
    Last Post: 11-25-2014, 11:45 AM
  2. How's tmobile treating you?
    By Vanti in forum T-Mobile
    Replies: 8
    Last Post: 03-10-2014, 04:22 AM
  3. Switch from AT&T to T-Mobile
    By grape8pe in forum AT&T
    Replies: 22
    Last Post: 12-17-2013, 09:05 PM
  4. Replies: 3
    Last Post: 07-12-2013, 10:41 PM
  5. Replies: 1
    Last Post: 07-12-2013, 08:59 PM

Posting Permissions