When the file is found, the value "where" shows C:\... , but when the file is not found, it shows file:\\C:\... in iTunes, and from the code you can access the location using the Location property (error, possibly with your code - use "L" in "Location")
From the SDK documentation:
HRESULT Location ([out, retval] BSTR *location)
Returns the full path to the file represented by this track.
Parameters: location Returns the full path to the file represented by this track.
Return Values:
S_OK operation was successful.
S_FALSE location cannot be restored (for example, the file does not exist in the expected location).
E_POINTER location is NULL .
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error has occurred.
I was able to reproduce this (that is, see the value of "where" in itunes when the file cannot be found, and get the null returned from the IITFileOrCDTrack.Location file. I do not think that If this is undocumented, it is impossible to return the value if The actual file was not found.
source share