Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iTunes missing files (tracks)

I decided to move my iTunes Media folder to an external drive. I followed the article in Macworld Christmas 2011 (p.71), "Move your iTunes Media folder", to the letter.


Unfortunately iTunes did not move my entire library; of over 30,000 files, it left more than 5,000 alone. These tracks were then marked as 'lost'.


When this happens, there's no going back. If you don't mind losing all your ratings etc., you can find which items are missing & drop them on iTunes to start again. But if that isn't an option, you have to locate each track — an estimated 48 hours work in my case.


You can either locate the files in their original locations, & then consolidate the library (which copies them to the new Media folder), or you can move them first & then locate them in their new locations. That's slightly quicker, so that's the route I took.


The problem is that there doesn't seem to be a shortcut to locating the "missing" tracks. They're all in the right places, & nothing has changed, but once iTunes marks them as missing the only way to locate them is individually (under certain circumstances you may be asked if iTunes should look for more files in the same folder, but as many people have remarked, it doesn't actually do so when you click on 'Okay').


I tried looking for scripts that could automate this task. I downloaded three scripts from Doug's AppleScripts for iTunes, namely "Fix Missing Tracks", "List MIAs" & "iTunes Track CPR". The latter was the most promising, since it should in theory look for all selected missing tracks & locate them in the new Media folder, thereby locating them. However, it kept giving the self-contradictory result "Recovered: 0 / Still MIA: 0".


So… any suggestions? Any more up-to-date scripts to address this issue?


iTunes 10.5.2

iMac, Mac OS X (10.6.8), Logic Studio 8.0.2, Occam's Razor Pro

Posted on Dec 25, 2011 4:05 AM

Reply
Question marked as Best reply

Posted on Dec 25, 2011 6:03 AM

There is a way of going back and that is to use your backup you make of your hard drive before doing major changes on your computer.


I don't have the MacWorld article. First, there are two processes and you need to decide which you want to do. One is just moving your media folder but leaving all your other iTunes files on your computer. I believe this is usually accomplished by changing the media folder location in preferences and then consolidating the collection. The other (and generally preferred) process is moving your whole iTunes folder and all related files to another drive by copying the whole iTunes folder to the external drive, then starting starting iTunes with the option key held down to show it the new location.


I don't know of any other scripts for sorting out broken links other than the ones you noted.

16 replies
Question marked as Best reply

Dec 25, 2011 6:03 AM in response to Caramby

There is a way of going back and that is to use your backup you make of your hard drive before doing major changes on your computer.


I don't have the MacWorld article. First, there are two processes and you need to decide which you want to do. One is just moving your media folder but leaving all your other iTunes files on your computer. I believe this is usually accomplished by changing the media folder location in preferences and then consolidating the collection. The other (and generally preferred) process is moving your whole iTunes folder and all related files to another drive by copying the whole iTunes folder to the external drive, then starting starting iTunes with the option key held down to show it the new location.


I don't know of any other scripts for sorting out broken links other than the ones you noted.

Dec 25, 2011 7:48 AM in response to Limnos

I just used Time Machine to replace the files in user/music/iTunes (apart from iTunes Music Library.xml which wouldn't display in Time Machine).


Everything does, so far, appear to be as it was. So you're right that there is a way of going back. I did realise that before embarking on this project, & took appropriate steps, but for some reason I forgot all about it (I blame Christmas).


So for anyone else trying this, it's the same old story: make sure everything's backed-up, & in this case particularly the files in that location (which at least are relatively small — if you ignore all your Mobile Apps)!


However… what to do next.


I had been aware of the two methods you describe, & I'd obviously performed one of them previously since all my songs were in a folder of my own creation, although still on the boot drive. I think I must have used your latter method ("copy files then option-launch"), & I don't know why I tried the former ("change location & consolidate") other than that Macworld had written their article & that was the method they outlined.


The second moral of this story seems to be: don't attempt anything risky & complicated when you're ill. Bah.


Anyway, I am ill, but in order to free up space on my boot drive I'm desperate to move all my songs to an external drive, so I'm going to have another go.


Obviously I could try your 'Method One' again, but that's the one that failed previously — & of course it might fail again. Also in favour of 'Method Two' is that I think it must have been what I tried the first time, long ago, successfully.


So before I go & do something stupid, exactly which files do I need to copy to the new location? Because I've already copied everything (all the songs, basically) that was moved last time. IOW — do I need to move anything else?


Or can I just option-launch iTunes (which would be remarkably simple)?


P.S.: in case it was that simple, I just tried it, & got the message "an iTunes Library file could not be found in that location". So I guess not.

Dec 26, 2011 4:02 PM in response to Caramby

iTunes: How to move your music to a new computer - http://support.apple.com/kb/HT4527


do not confuse moving your whole folder and library with moving just media files as in


iTunes for Mac: Moving your iTunes Media folder - http://support.apple.com/kb/HT1449


Is this the Macworld article?


Macworld - How to transfer iTunes libraries between PC and Mac - http://www.macworld.com/article/46248/2005/08/shiftitunes.html


It is describing the process for just moving your media, not relocating all of the iTunes files and folders which allows for greater flexibility an better stability.


The 'cannot find library' is because if you use the media moving process your library is not moved as part of

that -- that's the whole point in just moving media. By library it means the iTunes Library file which is what stores all the information used to present the layout you see when you open iTunes. Use the copy the whole iTunes folder procedure to make sure everything iTunes needs is copied to the external drive.


I don't know why it left 5000 of your files behind when you consolidated (if that's what you did). Frankly I don't think just moving the media file alone is a very useful process.

Dec 27, 2011 3:09 AM in response to Limnos

That wasn't the Macworld article (the one I was referring to was in the Christmas 2011 issue, i.e., last month's, & doesn't appear to be online yet). However, the advice it gave was exactly the same as in http://support.apple.com/kb/HT1449, which you mention.


I also read your link http://support.apple.com/kb/HT4527, but as far as I can see it gives exactly the same advice yet again — use Consolidate Library to let iTunes do all the copying to the new location.


I was indeed trying to move just the media. The reason for doing so is to free up space on my boot drive. I had moved the media before, successfully (& it's all backed-up in triplicate on 3 different external drives, JIC).


I don't know why it left 5000 of your files behind when you consolidated (if that's what you did). Frankly I don't think just moving the media file alone is a very useful process.


I think there may have been a glitch while consolidating the library, causing iTunes to stop before it had finished. I don't know what this may have been, since it was running unattended overnight & everything appeared fine in the morning (job apparently done, no error messages). It wasn't even apparent that any of the files were missing, until I double-checked the sizes of the folders.


As for moving the media being useful — I think it is useful to free up 200Gb on my boot drive! If it is even better to move something else as well along with the media, then that's fine; although at the moment I don't understand what the advantage is. (I would be glad to know about it, if there is one.)


What I'm finding troublesome is that I'm sure I have previously moved my Media folder without using Consolidate Library. It was some time ago, but as I remember it, I just copied the folder & then did Something Mysterious™ which convinced iTunes that everything was still okay but that all my media was in the new location instead of the old one.


Am I imagining it? Misremembering? Is Consolidate Library the only way to move my files? If so, I will just have to try the whole procedure again, exactly as before. If not, I would very much like to hear what the alternative method is…

Dec 27, 2011 3:21 AM in response to Limnos

As a further note, I thought perhaps I should just mention that the very first thing I tried was copying the Media folder to the new location, telling iTunes that that's where all my media files should live thank you very much, & then using Consolidate Library.


However, this resulted in iTunes copying duplicates of each & every one of my files into the respective new folders, so I had to put a stop to that pretty quick (or I would have had a double-sized Media folder with half the files being useless).


IOW: it changed this —


Media / Artist / Album / Song, Another_Song, Yet_Another_Song


…into this —


Media / Artist / Album / Song, Song_1, Another_Song, Another_Song_1, Yet_Another_Song, Yet_Another_Song_1

Dec 28, 2011 8:16 AM in response to Caramby

Do NOT copy the media folder. Copy the whole iTunes folder and everything it contains; various library files, artwork folder, various media folders. Start iTunes with the option key held down and guide it to the library file on the external drive, which will have been copied over with everything else. That's it. Make sure the external is always switched on when using iTunes or it will revert to the internal as default and you'll have to hold down the option key and restart again.


If you insist upon using the consolidate feature and then moving just the media files, you will end up with just the media files alone on the external and all the controlling files for iTunes on the internal. Splitting them up this way is what doesn't make sense (as I said earlier) because it is just much, much simpler to keep it all on one drive, be it internal or external. If you do something like renaming the drive, or trying to use it with another computer, it won't have all the files there and may also have problems linking up the folders. By using Finder to copy the files instead of consolidate it will also probably be a more reliable method to ensure those 5000 misssing ones get copied too.

Dec 28, 2011 11:21 AM in response to Caramby

Your media folders are part of the iTunes folder. They are inside of it. When you copy the iTunes folder to the external you are also copying the media which is inside of it* to the external drive. Once you start up using the iTunes folder on the external you can then delete the iTunes folder on the internal and free up all your media space, plus the space occupied by the artwork, etc. because it is now all on the external.


iTunes' folder structure, March 2010 - http://discussions.apple.com/message.jspa?messageID=11260991 - Topic What/where is my iTunes "Media" folder?


*Assuming you have iTunes set to manage your media and organize folders, otherwise the media are where you have changed default preferences. Where the media are stored is indicated in iTunes preferences.

Dec 28, 2011 1:55 PM in response to Limnos

Okay. This isn't straightforward. My Media folder isn't currently inside the iTunes folder, but nevertheless its contents & folder structure are entirely determined by iTunes.


When you said "Do NOT copy the media folder" I naturally took you literally, & there was no contradictio ad absurdam since I could eaily copy the iTunes folder without copying the Media folder. But I see now that you believed my Media folder was inside the iTunes folder (although I've already said that it isn't). So you actually meant "do not copy the Media folder independently of the iTunes folder".


So how can I avoid making another mess? Everything is fine at the moment, but I do want to move everything to this external drive.


I don't want to use Consolidate Library to copy all my files if I can avoid it; I've been trying all along to avoid it.


If I took you at your word, I should move my iTunes folder to the external drive, & place the Media folder which is already on that drive inside the newly-arrived iTunes folder. Option-launch, navigate to Library… & I suspect that might not be sufficient to get everything to work.


(Of course, if it is, then that's great!)


I would guess I would need to specify the location of the external Media folder before moving the iTunes folder, but that location won't exist until after I've moved it… so I can't.


Then I'm assuming that iTunes somehow "accepts" that media files in a folder (even a wrongly-named folder) are the files it already has listed as living in another location, & keeps all the metadata such as ratings etc.


And my Media isn't currently called "iTunes Media", so would it have to be renamed for this trick to work?


I'm asking rather than experimenting, because copying this many files & restoring them from back-up at every ****-up is no mean task, especially since I can't work for more than a couple of hours a day & I would like to do something more productive with my limited time.


So I apologise for my persistence in questioning the process, but given the circumstances, which are:


• My Media folder is called "something else" & it lives on my internal drive, but not inside the iTunes folder

• There is an exact copy of this Media folder waiting to go, already on my external drive

• iTunes is currently working correctly, with all tracks accounted for & all songs rated


…what exactly do I need to do to get everything safely on the external drive, without losing my ratings etc., & without any tracks getting lost? (And without using Consolidate Library… or at least, without having it copy any files?)


Here's what I would guess might work (but please correct me if I'm wrong):


• Rename my Media folder "iTunes Media" (I hope that actually is the correct name!)

• Move it back into the iTunes folder

• In iTunes preferences, specify the location of the Media folder as back from whence it came (& where it now is once again, in the iTunes folder; in fact, clicking the 'Default' button would probably work)

• Quit iTunes, copy the iTunes folder & all its contents to the external drive

• Move the old iTunes folder to the Desktop to avoid an identity crisis

• Option-launch iTunes, navigate to the Library in the iTunes folder on the external drive

• Check everything is working, ratings correct, etc.

• Trash the old iTunes folder

• Live happily ever after.

Dec 28, 2011 2:05 PM in response to Limnos

P.S.: I didn't use any profanity in the above post, & certainly wouldn't have wanted to. However, the forum software has decided that certain harmless expressions in common use in Britain are unfit for American eyes, & so has ruled that they should be made to appear far more offensive than they actually are. This is particularly unfortunate for people such as a family I know who I can't refer to by name without the software making it look as if I'm swearing. Which is, frankly, far more offensive than any actual swearing could possibly be.


So please don't mistake my tone, just because the software makes it look as if I'm getting heated when I'm not!


🙂

Dec 28, 2011 3:02 PM in response to Caramby

I think what would make this easiest would be to change iTunes back to its default settings of keeping your media inside of iTunes and having it organize your media. Change the preference settings and then have it consolidate everything into the iTunes folder, kind of as in the structure pictured in one of the links I provided earlier. If there are any straggler files, you might need to add those by hand. There is also a Dougscript that will scan folders for any files not already in iTunes and add them. Then copy the whole iTunes folder to the other drive, etc.


I am hesitant about your moving folders by hand and renaming them. I don't have iTunes manage my music at all, nor copy it anywhere when adding to iTunes. I know I can then move files around inside a drive (but not between drives) and iTunes is good at keeping track of them, but you aren't doing exactly this. If iTunes is supposedly in charge of managing media I think it is pretty fussy about you manually doing things.

Dec 28, 2011 3:47 PM in response to Limnos

I'm not doing anything manually. I'm not renaming files or folders. I'm not creating new folders. iTunes organises my library — just not in the default location. Everything in my Media folder is untouched by me — only iTunes goes in there (naturally, I take a peek every now & then, but I don't touch)! There are no stragglers.


The only folder that I was considering renaming was the Media folder itself (not its contents), & only then if that would help iTunes recognise it. If iTunes will recognise any folder containing media that's inside the iTunes folder, then there would be no need for any renaming at all.


However, I'm aware that folders are recognised by other features than their Finder names, & that giving folders names in the Finder won't necessarily do the trick.


Plus, since my Media folder is on the same drive as my iTunes folder (albeit not currently within it), I would be moving it & its contents around within the confines of the same volume.


But with all the above being the case, if you still think I should use Consolidate Library to move the media files back to the default locations, then that does sound like a good idea which would avoid the other possible problems mentioned above.


My only question then would be: what if, instead of moving the files, iTunes copies them? There might be a serious shortage of space if every file was duplicated!


If you think it will move & not copy, then it looks like the plan should be:


• Tell iTunes to use the default location for the iTunes Media folder

Consolidate Library

• Check all is well

• Quit iTunes

• Copy iTunes folder to external drive

• Move the old iTunes folder to the Desktop

• Option-launch iTunes, & navigate to the new external library

• Run it up the flagpole & see who salutes


Sounds like a plan which could work.

IF I haven't overlooked some detail (such as a preference setting).

And IF duplicate files won't arise from Consolidate Library.

Dec 28, 2011 8:01 PM in response to Caramby

Since I have been managing my own media since day one of iTunes I cannot give firsthand experience of consolidating. I believe it only copies them, not move, so yes, you would have space problems.


I also don't have experience of manually moving files in a situation where iTunes is managing music. Again, I have always had that preference unselected in iTunes. I guess you could try turning off automatically manage music, try moving a folder under controlled conditions, then try playing a track in it to see if iTunes can follow where you put it. If that works, then try manually moving your media folder to the proper location, set it up under preferences too, and then do the transfer.

Dec 29, 2011 7:38 AM in response to Limnos

Phase One:


• I went to the 'Advanced' pane in iTune Preferences, & under "iTunes Media folder location" I clicked on the "Default" button.


File > Library > Organize Library: I checked "Consolidate Library".

This did, indeed, make copies of all the files.


• I checked everything carefully; there were a couple of surprises, but these were easily fixed.


So Phase One was successful — I've moved everything back to its default locations.


I'll report on Phase Two (migrating the whole kit & kaboodle to an external hard drive) as soon as I've tried it.

Dec 29, 2011 1:05 PM in response to Limnos

Phase Two:


• Copied the iTunes folder to the external drive.

• Deleted the previous old Media folder (not the one in the iTunes folder — the other one).

• Deleted the iTunes folder from the internal drive.

• Checked everything.


It's all working. Mission successfully accomplished.


Limnos, if you'd like to sum this up, I'll mark it as the solution so that anyone in my situation who runs into the same problems will know what to do without all this hassle. Something like (I'm sure you can put it better):


If your Media folder is not in your iTunes folder, & you would like to move it all to another drive, the safest solution is to choose "Default" for the location of your Media folder your iTunes Advanced Preferences, & then to check "Consolidate Library" via File > Library > Organize Library.


This will copy all your media files back into your iTunes folder, so you need to be sure you have enough space on your drive for two complete sets of media files.


You can then use the Finder to copy the entire iTunes folder (which now includes your Media folder) to an external drive.


To start using the external iTunes folder instead of the old one on your internal drive, hold down the "Option" key while launching iTunes. You will be asked to locate an iTunes Library file, so navigate to the one in the iTunes folder on your external drive.


From now on, it will be that external folder being used (unless you specify otherwise). You can now delete the original Media folder, as well as the iTunes folder on your internal drive — although obviously you should check everything is working before & after each deletion, & of course make sure everything is backed-up before attempting any of this malarkey.


If something goes wrong at any point, you can move the files back from whence they came & use Time Machine to back up the other files in the iTunes folder, so that any files that were marked lost or missing will never have been missed.

iTunes missing files (tracks)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.