Skip to content

Instantly share code, notes, and snippets.

@nalanj
Created February 22, 2009 05:20
Show Gist options
  • Select an option

  • Save nalanj/68343 to your computer and use it in GitHub Desktop.

Select an option

Save nalanj/68343 to your computer and use it in GitHub Desktop.
-- Script to display the names of files that are missing from your iTunes Library
-- Adapted from the script at http://www.macosxhints.com/article.php?story=2007031309145927
tell application "iTunes"
set thePlaylist to library playlist 1
set musicFiles to the file tracks of thePlaylist
repeat with mf in musicFiles
--the name of mf as string
set hasLoc to ""
if (the location of mf as string ¬
is equal to "missing value") then
try
set comment of mf to the comment of mf & ""
on error number errNum
display dialog the name of mf as string
end try
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment