Last active
March 23, 2016 16:28
-
-
Save Spacerat/8772940 to your computer and use it in GitHub Desktop.
AppleScript to remove items from iTunes whose files have been deleted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTunes" | |
set selectedTracks to selection | |
repeat with i from 1 to (length of selectedTracks) | |
if class of item i of selectedTracks is not shared track then | |
tell item i of selectedTracks to set {loc} to {get location} | |
if loc is missing value then | |
tell application "iTunes" | |
delete item i of selectedTracks | |
end tell | |
end if | |
end if | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment