You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
504 B
21 lines
504 B
print -N "${@:a}" | xargs -0 osascript -e '
|
|
on run theFilePaths
|
|
tell application "Finder"
|
|
set thePOSIXFiles to {}
|
|
repeat with aFilePath in theFilePaths
|
|
set aPOSIXFile to aFilePath as POSIX file
|
|
if exists aPOSIXFile
|
|
set end of thePOSIXFiles to aPOSIXFile
|
|
end if
|
|
end repeat
|
|
move every item of thePOSIXFiles to trash
|
|
end tell
|
|
end run
|
|
' &>/dev/null
|
|
|
|
if (( $? != 0)); then
|
|
print "$0: failed to move one or more items" >&2
|
|
return 1
|
|
fi
|
|
|