(* Copyright (c) 2006 Jim Ursetto *)
(* Derived from scripts by Doug Adams (dougscripts.com) and
   from http://marv.kordix.com/archives/000860.html. *)

tell application "iTunes"
	if selection is not {} then
		set sel to a reference to selection
		repeat with f in sel
			if f's class is file track then
				set loc to (get f's location)
				-- log loc 
				if loc is not missing value then
					refresh f -- Update file location
				end if
			end if -- skip if incorrect type of track
		end repeat
	else
		display dialog "Nothing has been selected." buttons {"Cancel"} default button 1 with icon 0
	end if
end tell
