This action attempts to move all selected files to the trash. If files cannot be moved, the faults will be displayed. As such, it is intended that the action be run interactively. The action can easily be modified to run silent.
----- Start of action 'Trash Selected Files'
- This action attempts to move all selected files to the trash.
- Get Property Path to File -> Variable 0
- Build List with delimiter "⏎" in named variable 'list' from field Variable 0 (Raw) string delimiter "\~"
- Trash Items in "\<list>"
- if false
- Test if property 'Original Path to Folder' is equal to "\!Path to File!" (Set result and Variable 1)
- Build List with delimiter "\n" in named variable 'faults' from field Variable 0 (Sorted), if Variable 1
- Prompt Beep
- The following files(s) were not moved to the trash:
- \<faults> Hide Info
----- End of action 'Trash Selected Files'
Actions: Trash Selected Files
2018-05-21 First release.