|
|
Delete files without emptying the Trash
I did this a while back. I created an automator script which I placed in the services menu which also puts it under the right click menu in the Finder. To create it:
on run {input, parameters}
repeat with anItem in input
tell application "Finder"
set itemAlias to anItem as alias
set i to (info for itemAlias)
set {kind:itemKind, package folder:packageFolder, name:itemName} to i
if itemKind = "Folder" then
set fileList to items of itemAlias
if (count of fileList) is greater than 0 then
display dialog "Are you sure you want to delete the folder \"" & itemName & "\" and all of its contents?"
end if
else if packageFolder then
display dialog "Are you sure you want to delete the package folder \"" & itemName & "\""
end if
end tell
end repeat
return input
end run
Add a Run Shell Script. Make sure the Shell is set to "/bin/bash"
for file in "$@" do if [ -f "$file" ] then rm "$file" else rm -rf "$file" fi done
Edited on Jul 17, '13 02:24:25PM by jdb8167
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|