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 2m 10s ago
Delete files downloaded and cached by Apple Music
downloaded 16m 30s ago
Drag-and-drop to convert audio files with iTunes
downloaded 16m 40s ago
Recreate a playlist such that its visible columns mirror the Music library
downloaded 17m 4s ago
List tracks not assigned to playlists
downloaded 18m 13s ago
Display/export a text file list of chosen tag data in library or playlist
downloaded 20m 58s ago
Display, create text file listing info of dead tracks