I have virtually all of my music on a remote computer that is file-sharing the entire directory out (i use a network drive to get iTunes to read the music). One day, i started up iTunes and found that it's marked all of these files as unable to be found. Is there a way to force it to easily re-detect all of the tracks?
At least in some cases, if you manually locate one of your songs, then tell iTunes yes when it asks if you want it to find more missing songs based on this one's location, that will fix it.
Apparently after a little reading around this is what happens when iTunes starts but your network drive is not mapped properly.
To do this launch itunes and then point it to the new location (preferences, advanced tab). alternately, launch itunes with the alt key down and choose the new location that way. Source
I also found a VBS script to run when starting iTunes, it maps the network drive and only then launches iTunes. You could modify it with an if statement to only launch iTunes if the network drive is mapped and simply end if it cannot map the drive, but thats up to you. You will however need to modify the variables at the top to match your setup:
Simply replace the iTunes shortcut with this vbs file and it will check the network drive is mapped and then start iTunes. Source is here: tinyurl.com/2bvxqzd