Delete File

How can I delete a file without the trash noise of the tell finder to delete way, I did it with 100 files at once, it was annoying. Preferably without moving to trash, a shell?

Hello,

try

set thisFile to "HFS:Path:to:aFile.ext"
tell application "System Events"
	delete file thisFile
end tell

or

set thisFile to "HFS:Path:to:aFile.ext"
do shell script "rm -f" & space & quoted form of POSIX path of thisFile

or to to delete all files and folders (including sub folders)

set thisFolder to "HFS:path:to:folder:"
do shell script "rm -r" & space & quoted form of POSIX path of thisFolder

Thanks :slight_smile: