Permanently delete files via AppleScript |
|
|
Ever since switching to OS X from Windows, I've missed the convenience of being able to permanently delete files using Shift-Delete. In order to duplicate that functionality, I've written a short AppleScript that will delete the files selected in Finder instead of placing them in the trash.
set frontAppPath to (path to frontmost application) as string
if the frontAppPath ends with ":Finder.app:" then
tell application "Finder"
set selectionList to get selection as list
set selectedCount to count items in selectionList
if selectedCount > 0 then
repeat with i from 1 to number of items in the selectionList
set selectedItem to item i of the selectionList
set selectedName to the name of sele...
|