tell application "iTunes"
repeat with theTrack in selection
set dbid to theTrack's database ID
set filePath to theTrack's location as Unicode text
--ライブラリから削除
delete (some track of library playlist 1 whose database ID is dbid)
--ファイルをゴミ箱へ移動
tell application "Finder"
delete file filePath
end tell
end repeat
end tell
ライブラリは音楽/動画関係なくlibrary playlist
なので、そこからdatabase ID
を条件にトラックを削除する。ライブラリから削除しただけではファイルが削除されないので、別途削除する。