Created
July 31, 2015 17:36
-
-
Save erikccoder/717a48057b715946c624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on open theFileDropped | |
display alert "Are you sure you want to permanently delete " & the length of theFileDropped & " file(s)?" message "You cannot undo this action." as warning buttons {"Cancel", "OK"} default button 2 | |
if the button returned of the result is "OK" then | |
repeat with aFile in theFileDropped | |
do shell script "rm -Rf " & quoted form of POSIX path of aFile | |
end repeat | |
do shell script "afplay \"/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/finder/empty trash.aif\"" | |
end if | |
end open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment