Can anyone help me write a script that will delete a currently selected track or tracks in Itunes, move to the trash, and empty the trash with no extra dialog boxes popping up?
Model: dual g5 2.0
Browser: Safari 412
Operating System: Mac OS X (10.4)
I won’t test this, but may work for you
tell application "iTunes"
set itemsToDeleteFromDisk to location of selection
delete selection --> remove from iTunes
tell application "Finder"
Note that if you delete the file itself, it would still be listed in the library playlilst. You might want to remove that also.
You can just delete a track from a playlist other than the library playlist instead of removing the file.
Thanks for the responses! Actually, I DO need to remove the track from the playlist also.
Here’s everything I need the script to do.
- Remove track from playlist
- Send the file to the trash
- empty the trash
So, how would the script that JJ suggest be changed?