OS X 10.8 or later. Assists with segregating iTunes Match tracks that appear to get cut-off when played (due to a possible bug, described here). Then these truncated tracks can be deleted and re-downloaded intact (by you, not the script).
Perhaps Also of Interest...
downloaded 21m 33s ago
Recreate a playlist such that its visible columns mirror the Music library
downloaded 21m 56s ago
Delete files downloaded and cached by Apple Music
downloaded 28m 0s ago
Perform tasks on a batch of playlists; rename, delete, duplicate, merge, more
downloaded 50m 33s ago
Delete characters from the beginning or ending of selected tracks' name, artist, album, comments, composer, or show tags
downloaded 51m 25s ago
Create a playlist for each entry of a specified tag
downloaded 1h 11m 44s ago
Exports and then re-imports selected tracks' artwork